Closed Jimbly closed 7 years ago
All npm "scripts" add ./node_modules/.bin to the front of the path and evaluate there. You already have grunt as a dev dependency, so npm is installing the requested version of grunt into that path, and running the command through npm finds it. Alternatively, a use could run ./node_modules/.bin/grunt serve
, but that's ridiculous ;).
I definitely do not have grunt installed globally, but running "npm start" works fine after that change.
Oh ok. I'm not a node guy so I don't know these things.
Can we still call it "serve"? I think it's more descriptive than "start". If there is precedence in other projects for calling it "start" I would reconsider.
Also can you reduce the commit title length? Put the extra information in the description.
Once those issues are cleared up I will merge.
NPM treats "start" special, anything else has to be preceded with "run-script", e.g. npm run-script serve
vs npm start
. More descriptive is good and since this is a development script and not what an end-user should actually use when starting this, making the script called serve
sounds good. I'll make those changes. I may be a node guy, I'm not a github guy =)... to modify an already pushed commit, is there something cleaner than a rebase and force push?
The best way is to make the changes, git add
them, and then use git commit --amend
with the new message. Then do git push origin master --force
.
Also it's good practice to work in a feature branch and do the pull request from your feature branch to master.
Commit modified =)
👍
Thanks for contributing.
However, I don't see how this eliminates the need for a global grunt install. Doesn't this npm script rely upon a global grunt install?
If you want to get rid of grunt and use npm for everything, I would consider a plan to do that.