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.
8
8
- Jest for unit testing
9
9
- Precommit linting
10
10
- 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
12
13
- Ready-to-use GitHub Actions workflow for releasing on push to ` master `
13
14
14
15
## Using this Template
Original file line number Diff line number Diff line change 15
15
"release" : " yarn run semantic-release" ,
16
16
"release-ci" : " echo 'unsafe-perm = true' > ./.npmrc && yarn run semantic-release && rm -rf ./.npmrc" ,
17
17
"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.'"
19
19
},
20
20
"repository" : " https://bitbucket.org/Carimus/carimus-node-ts-package-template" ,
21
21
"author" : " Carimus" ,
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
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 ;'
7
7
8
8
# Pretty up the package.json so it's still consistent with the codebase's code style
9
9
prettier --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