npm-run-all icon indicating copy to clipboard operation
npm-run-all copied to clipboard

feature request - compatibility with https://www.npmjs.com/package/in-publish

Open jantimon opened this issue 8 years ago • 2 comments

Would it be possible to combine npm-run-all with https://www.npmjs.com/package/in-publish (2million downloads / month)?

in-publish allows to check if the prepublish hook was invoked by npm install or npm publish as you might want to run your test scripts only if not in install mode (there are endless open issues for npm on this topic).

Maybe you could just add a --skip-command="install" parameter and use these two functions of in-publish: https://github.com/iarna/in-publish/blob/master/index.js#L22-L28

jantimon avatar Feb 13 '17 09:02 jantimon

Thank you for this issue.

However, I don't want to add any option for this for the following reasons:

  • in-publish is very small CLI, so it's more proper than npm-run-all to be included in dependencies. (npm-run-all is large module relatively.)
  • That option is going to be a short life because the problem of prepublish script is going to resolve on npm@4.

mysticatea avatar Feb 13 '17 09:02 mysticatea

Okay actually the npm@4 way is a good approach although yarn is struggling to implement it

jantimon avatar Feb 13 '17 12:02 jantimon