Feat: prepublish script added in package.json. Fix: at end of publish need to remove dist folder

This commit is contained in:
Lorenzo Iovino 2019-02-05 10:59:07 +01:00
parent 181595eeca
commit 8c91a36e94
2 changed files with 11 additions and 10 deletions

View file

@ -9,7 +9,9 @@
"scripts": {
"transpile": "ngc",
"build": "npm run transpile",
"publish": "npm run build && cp publishPackage.json ./dist/package.json && cp README.md ./dist/README.md && cd dist && npm publish --access=public"
"test": "ng test",
"prepublish": "npm run test",
"publish": "npm run build && cp publishPackage.json ./dist/package.json && cp README.md ./dist/README.md && cd dist && npm publish --access=public && rm -rf ./dist"
},
"keywords": [],
"author": "Lorenzo Iovino",