File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ re-usable library on npm.
88- Jest for unit testing
99- Precommit linting
1010- Precommit formatting via [ Prettier] ( https://prettier.io )
11- - Prepublish TypeScript build for distribution on npm
11+ - Prepare script for TypeScript build for distribution on npm
12+ - Prepack build command for TypeScript build to allow installation direct from GitHub
1213- Ready-to-use GitHub Actions workflow for releasing on push to ` master `
1314
1415## Using this Template
Original file line number Diff line number Diff line change 1515 "release" : " yarn run semantic-release" ,
1616 "release-ci" : " echo 'unsafe-perm = true' > ./.npmrc && yarn run semantic-release && rm -rf ./.npmrc" ,
1717 "commit" : " git-cz" ,
18- "postinstall " : " yarn run build && echo 'Postinstall build command is replaced with prepublishOnly during semantic-release publish prep.'"
18+ "prepack " : " yarn --ignore-scripts && yarn run build && echo 'Prepack dev build command is removed during semantic-release publish prep.'"
1919 },
2020 "repository" : " https://bitbucket.org/Carimus/carimus-node-ts-package-template" ,
2121 "author" : " Carimus" ,
Original file line number Diff line number Diff line change 22
33set -e
44
5- # Update the package.json to place the build command in prepublishOnly instead of in postinstall
6- json -I -f package.json -e ' this.scripts.prepublishOnly = "yarn run build"; delete this.scripts.postinstall ;'
5+ # Update the package.json to remove prepack command.
6+ json -I -f package.json -e ' delete this.scripts.prepack ;'
77
88# Pretty up the package.json so it's still consistent with the codebase's code style
99prettier --write package.json
10+
11+ # Run the build to get ./dist output
12+ yarn run build
You can’t perform that action at this time.
0 commit comments