Skip to content

Commit 84ba8ca

Browse files
committed
Deployment
1 parent f997eae commit 84ba8ca

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ npm install ngx-nullish
6666
</p>
6767
```
6868

69+
## Deployment
70+
71+
Please run a script:
72+
73+
```bash
74+
./scripts/deploy.sh
75+
```
76+
6977
## License
7078

7179
[The MIT License](https://piecioshka.mit-license.org) @ 2020

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
"start": "ng serve",
77
"prebuild": "cp README.md projects/ngx-nullish && rm -rf dist/",
88
"build": "ng build --prod",
9+
"postbuild": "rm projects/ngx-nullish/README.md",
910
"test": "ng test --no-watch --no-progress --browsers ChromeHeadless",
1011
"test:watch": "ng test",
1112
"lint": "ng lint",
12-
"e2e": "ng e2e",
13-
"predeploy": "npm run lint && npm run test && npm run build",
14-
"deploy": "npm publish --folder ./dist/ngx-nullish"
13+
"e2e": "ng e2e"
1514
},
1615
"private": true,
1716
"dependencies": {

scripts/deploy.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
3+
npm run lint
4+
npm run test
5+
6+
rm -rf dist/
7+
8+
cd projects/ngx-nullish
9+
npm version patch
10+
11+
VERSION=$(jq -r '.version' package.json)
12+
13+
cd ../../
14+
15+
git commit -am "$VERSION"
16+
git tag "$VERSION"
17+
18+
npm run build
19+
20+
npm publish --folder ./dist/ngx-nullish

0 commit comments

Comments
 (0)