forked from argentlabs/argent-x
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ pnpm-lock.yaml | |
.env | ||
sourcemaps | ||
coverage | ||
*.tsbuildinfo | ||
*.tsbuildinfo | ||
license-report.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"output": "markdown", | ||
"fields": [ | ||
"name", | ||
"licenseType", | ||
"link", | ||
"author", | ||
"installedVersion", | ||
"definedVersion", | ||
"remoteVersion", | ||
"latestRemoteVersion" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# declare blacklist | ||
BLACKLIST=( | ||
"storybook" | ||
) | ||
|
||
# install license-report if not already installed | ||
if ! command -v license-report &> /dev/null | ||
then | ||
echo "license-report could not be found, installing..." | ||
npm install -g license-report | ||
fi | ||
|
||
# create license-report.md | ||
echo "Generating license report..." | ||
echo "# License Report" > license-report.md | ||
echo "" >> license-report.md | ||
echo "This report was generated on $(date)" >> license-report.md | ||
echo "" >> license-report.md | ||
|
||
# loop over all packages | ||
for package in $(ls packages); do | ||
# check if package is in a blacklist | ||
if [[ " ${BLACKLIST[@]} " =~ " ${package} " ]]; then | ||
echo "Skipping $package..." | ||
continue | ||
fi | ||
echo "Generating license report for $package..." | ||
echo "## @argent/$package" >> license-report.md | ||
echo "" >> license-report.md | ||
license-report --package=./packages/$package/package.json --only=prod --config=license-report-config.json >> license-report.md | ||
echo "" >> license-report.md | ||
done | ||
|
||
# format license-report.md | ||
echo "Formatting license report..." | ||
yarn prettier --write license-report.md |