Skip to content

Commit

Permalink
Fix npm@6 warnings about deprecated "prepublish" (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored and mjmahone committed May 11, 2018
1 parent ef585e9 commit 6d7e08b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"build:mjs": "BABEL_MODULES=1 babel src --optional runtime --ignore __tests__ --out-dir dist/module/ && for file in $(find dist/module -name '*.js'); do mv \"$file\" `echo \"$file\" | sed 's/dist\\/module/dist/g; s/.js$/.mjs/g'`; done && rm -rf dist/module",
"build:flow": "for file in $(find ./src -name '*.js' -not -path '*/__tests__*'); do cp \"$file\" `echo \"$file\" | sed 's/\\/src\\//\\/dist\\//g'`.flow; done",
"preversion": ". ./resources/checkgit.sh && npm test",
"prepublish": ". ./resources/prepublish.sh",
"prepublishOnly": ". ./resources/prepublish.sh",
"gitpublish": ". ./resources/gitpublish.sh"
},
"dependencies": {
Expand Down
7 changes: 0 additions & 7 deletions resources/prepublish.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Because of a long-running npm issue (https://github.com/npm/npm/issues/3059)
# prepublish runs after `npm install` and `npm pack`.
# In order to only run prepublish before `npm publish`, we have to check argv.
if node -e "process.exit(($npm_config_argv).original.length > 0 && ($npm_config_argv).original[0].indexOf('pu') === 0)"; then
exit 0;
fi

# Publishing to NPM is currently supported by Travis CI, which ensures that all
# tests pass first and the deployed module contains the correct file structure.
# In order to prevent inadvertently circumventing this, we ensure that a CI
Expand Down

0 comments on commit 6d7e08b

Please sign in to comment.