-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Add npm scripts #3763
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
Add npm scripts #3763
Conversation
Would this post-install hook break things if there is nothing to Gulp? |
Out of the box it works fine.It should only fail if it can't find the |
The |
I'm ok with it. |
Great! |
One thing though is that you're doing |
This also assumes you have the correct node_moduels/bin aliasing setup. That doesn't happen out of the box on windows machines, so this will break installs for people. |
@GrahamCampbell it should be fine. I think Node handles the |
Doesn't work for me. |
-1: I had this very idea in mind for weeks, and for the reasons listed here never proposed it. Yes, it looks shiny and all, but again, doesn't serve anything spectacular except pointing devs-not-familiar-with-node to 'scripts' config in package.json. IMHO Btw, I think it's good idea to move all those |
The whole point is to now having to install |
Who doesn't install |
That's not a valid argument. We can't just say "f**k those people". |
Hahaha, @GrahamCampbell :) I provided workaround for those people. You don't have to install anything globally anyway. |
This is correct, it is very common. Though, this updated doesn't force you to stop using you globally installed version of One problem with using the globally installed version of |
(apologies if I am misunderstanding the problem, I am not very familiar with laravel) npm solves the problem of absent global deps by putting the So if you declare This also resolves the issue of different projects needing different versions of gulp. |
Yes, it does. Though, it requires the project to use npm scripts. |
@nhowell and instead of polluting your git repo, you pollute your prod server with tons of needless tools used for deployment?! That's even worse, having all that node, npm, compass blah blah tools, totally unrelated to a PHP-run software. What happened to CI/CD in software development workflow? |
@vinkla I see that, but other entries remain for the |
@vinkla That’s what I mean: I would have been fine if that was mentioned in my PR instead of going “nope”. |
@shehi Yes, that's a fair point - The "right way" being to use continuous integration & deployment. In my case, I wasn't afforded that luxury, and instead began using a simpler deployment tool (e.g. like http://deployer.org/). Anyway, if the official stance is to keep this change to |
Wouldn't it be awesome if we could simplify the installation processer for newcomers? We can do that by using
gulp
executable in ourpackage.json
file.npm run dev
is an alias forgulp watch
npm run prod
is an alias forgulp --production
Benefits;
gulp
file will be executed after installing the dependencies withnpm install
.gulp
globally.Also discussed in https://github.com/laravel/elixir/issues/492 with @JeffreyWay.