diff --git a/package.json b/package.json index b4003fb953..15c57bf7d3 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/resources/prepublish.sh b/resources/prepublish.sh index 4914ae48d0..933d406dc8 100644 --- a/resources/prepublish.sh +++ b/resources/prepublish.sh @@ -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