Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support npm script preversion, version, and postversion #2

Closed
Harris-Miller opened this issue Jan 29, 2016 · 3 comments · Fixed by #17
Closed

Support npm script preversion, version, and postversion #2

Harris-Miller opened this issue Jan 29, 2016 · 3 comments · Fixed by #17

Comments

@Harris-Miller
Copy link

I've begun using this module as a replacement for npm version, but what I'm missing is the auto running npm scripts when I use npm version (a la: https://docs.npmjs.com/cli/version)

Be great if running them could be added in the same order of operation. I'm willing to give that implementation a shot too, let me know if you want me to start investigating

@JamesMessinger
Copy link
Member

That's a great idea! I don't have the spare time to implement it right now, but I'll leave this issue open as a to-do item and reminder.

In the meantime, if you want to add this, I'll gladly review a PR. The code already contains an exec() function for running git commands. It shouldn't be too hard to make it run the npm run preversion and npm run postversion commands too.

@webuniverseio
Copy link
Contributor

It is not that easy to use exec to run npm, since on windows it is represented as a .bat file and libuv (that is used by spawn) has a ~1.5 years old bug with .bat and .cmd files... nodejs/node-v0.x-archive#25330, libuv/libuv#358

I'm trying to see how that can be worked around, ideally by avoiding OS sniffing.

@webuniverseio
Copy link
Contributor

Created #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants