Skip to content

Commit

Permalink
Prevent direct publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
Enngage committed Oct 22, 2018
1 parent 473d4f4 commit de2e665
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/ngx-captcha-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"scripts": {
"build:lib": "ng build ngx-captcha-lib",
"publish:lib": "npm run build:lib && npm publish dist",
"prepublishOnly": "npm run build:lib"
"prepublishOnly": "npm run prevent-publish",
"prevent-publish": "node prevent-publish"
},
"peerDependencies": {
"@angular/common": "^7.0.0",
Expand Down
1 change: 1 addition & 0 deletions projects/ngx-captcha-lib/prevent-publish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
throw Error(`Direct publish to npm is forbidden. Use 'npm run publish:lib' npm script instead`);

0 comments on commit de2e665

Please sign in to comment.