Skip to content

Commit

Permalink
Use a prepare script for transpiling instead of prepublish (#323)
Browse files Browse the repository at this point in the history
From Travis logs:
As of npm@5, `prepublish` scripts will run only for `npm publish`.
(In npm@4 and previous versions, it also runs for `npm install`.)
See the deprecation note in `npm help scripts` for more information.

This was also causing discord-irc to fail to transpile when installed
using npm from source.

This modifies the script to run on the `prepare` hook, so it should
transpile when installed directly from source too.
  • Loading branch information
Throne3d authored and ekmartin committed Oct 10, 2017
1 parent 6eca392 commit db39ba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"scripts": {
"start": "node dist/index.js",
"build": "babel lib --out-dir dist",
"prepublish": "npm run build",
"prepare": "npm run build",
"lint": "eslint . --ignore-path .gitignore",
"coverage": "nyc --require babel-core/register _mocha -- test/*.test.js",
"report": "nyc report --reporter=text-lcov | coveralls",
Expand Down

0 comments on commit db39ba2

Please sign in to comment.