diff --git a/projects/ngx-captcha-lib/package.json b/projects/ngx-captcha-lib/package.json index c72e4ed..ed8cb2f 100644 --- a/projects/ngx-captcha-lib/package.json +++ b/projects/ngx-captcha-lib/package.json @@ -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", diff --git a/projects/ngx-captcha-lib/prevent-publish.js b/projects/ngx-captcha-lib/prevent-publish.js new file mode 100644 index 0000000..575c50a --- /dev/null +++ b/projects/ngx-captcha-lib/prevent-publish.js @@ -0,0 +1 @@ +throw Error(`Direct publish to npm is forbidden. Use 'npm run publish:lib' npm script instead`); \ No newline at end of file