Skip to content

Commit

Permalink
release: ngx-editor v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Oct 4, 2018
1 parent fd5f600 commit 1ce4886
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-editor",
"version": "3.3.0",
"version": "4.0.0",
"description": "WYSIWYG Editor for Angular Applications",
"license": "MIT",
"scripts": {
Expand All @@ -12,6 +12,7 @@
"ng": "ng",
"postbuild": "npm run build:package",
"prebuild": "npm run lint",
"prepublishOnly": "node ./scripts/prepublish.js",
"prerelease": "npm run build",
"release": "sh ./scripts/release.sh",
"start": "ng serve --aot -o --port 5000 --host 0.0.0.0",
Expand Down Expand Up @@ -62,6 +63,7 @@
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"bootstrap": "^4.1.3",
"chalk": "^2.4.1",
"codelyzer": "~4.3.0",
"core-js": "^2.5.4",
"font-awesome": "^4.7.0",
Expand Down
15 changes: 15 additions & 0 deletions scripts/prepublish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
'use strict';

const chalk = require('chalk');

const { RELEASE_MODE } = process.env;

const errorMessgae = `${'Publishing directly to npm is restricted.'
+ '\n'
+ 'Run '}${chalk.cyan(`\`${chalk.underline('npm run release')}\``)} to publish the package.`
+ '\n';

if (!RELEASE_MODE) {
console.log(chalk.red(errorMessgae));
process.exit(1);
}

0 comments on commit 1ce4886

Please sign in to comment.