-
Notifications
You must be signed in to change notification settings - Fork 248
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
feature: new core task for automatically running npm update/install #7
Comments
I just went over the workflow with a co-worker and in doing so realised just how weird it is that grunt-cli doesn't already do this.
|
Are you really making the argument that you'd prefer to put your entire build process in a Makefile vs typing I have to concur with all of Ben's reasons on gruntjs/grunt#569 for not implementing this. The real solution you want here is to set up a post-checkout git hook. |
I respect your points of view (obviously it's the only mature thing to do). I do find it weird that no-one disagrees with this point: potentially millions of people around the world are all manually running |
Git has a feature made for this express purpose: a post-checkout git hook. If you configured one, you could save yourself another step: you'll never have to type If you don't want to go that route, you could always write another grunt-cli. The grunt command is barely more than 100 loc. |
Thanks for the hints. It sounds like this exactly what I need. <3 |
I originally filed this request against the grunt project. I'm aware that it wasn't well-received over there, so I'm not expecting this to go very far, yet I persist...
problem
I have a typical JavaScript project. I want to automate deployment and builds to as few steps as possible. Right now I have to:
It would be terrific if grunt could be configured to automatically run
npm install
. This seems like something everyone does over and over again, and good tools are supposed to be efficient.This would facilitate the easy use of grunt and grunt plugins, without the extra step (provided package.json is properly defined).
alternative solutions
This can't really be done as a grunt plugin, because then it would need the developer to run
npm update
which defeats the purpose of this request.I can automate this myself in a Makefile, but then why bother even using grunt then?
proposed behaviour
npm install
npm install
I'm not sure when it would be best to run
npm update
, maybe have a task option that lets the developer choose the frequency or something? This is less important for my needs thannpm install
, but I thought I'd mention it for completeness.The text was updated successfully, but these errors were encountered: