Skip to content

Commit

Permalink
build: move postinstall to bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilch committed May 20, 2024
1 parent 8f20e97 commit ac0027d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"extract-dependency-licenses": "./scripts/extract-dependency-licenses.sh",
"verify-dependency-licenses-extract": "yarn extract-dependency-licenses && ./scripts/verify-dependency-licenses.sh",
"deprecate": "ts-node scripts/deprecate_release.ts",
"postinstall": "echo 'export default [' > scripts/components/private_packages.ts && grep -l packages/*/package.json -e '\"private\": \"\\?true\"\\?' | xargs cat | jq .name | tr -s '\\n' ',' >> scripts/components/private_packages.ts && echo '];' >> scripts/components/private_packages.ts"
"postinstall": "./scripts/postinstall.sh"
},
"bugs": {
"url": "https://github.com/aws-amplify/amplify-codegen/issues"
Expand Down
5 changes: 5 additions & 0 deletions scripts/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

echo 'export default [' > scripts/components/private_packages.ts
grep -l packages/*/package.json -e '"private": "\?true"\?' | xargs cat | jq .name | tr -s '\n' ',' >> scripts/components/private_packages.ts
echo '];' >> scripts/components/private_packages.ts

0 comments on commit ac0027d

Please sign in to comment.