Closed mde closed 9 years ago
The gulp-install
plugin is built with the purpose of being used within Slush generators. Because of this it's actually a feature that the install is disabled in tests, because a generator-developer should only need to test their own code and not verify that gulp-install
does its job (it's got its own tests for that).
I assume you're not building a generator? So my question is, why and how are you using gulp-install
inside your project? Maybe you could use the mentioned NODE_ENV=testing
instead?
Part of the fun of open source is that you never know how people are going to use your code. Given that it's called gulp-install, I can see where people might get the impression it should be use generically for installing things more broadly that just within Slush generators. Part of our build process uses Gulp to kick off a Bower installation in multiple directories, and the developer who built it picked gulp-install for that piece of the build. We have a pretty extensive build process, and switching the entire thing to use NODE_ENV=testing would be a lot more work than just replacing that one part. Thanks anyway. :)
@mde I see. What do you think about adding an option to gulp-install
which ignores the NODE_ENV and always installs packages? That would make it backwards compatible and solve both your and my problems...
That seems sort of like bandaiding the problem -- I was thinking more about other people trying to use gulp-install. Doing a build on a CI server is a very normal use-case, and "test" or "testing" as the environment is pretty common. It really depends on how much you want/anticipate people using gulp-install to install stuff, and how much of your own process you're willing to change to facilitate that.
Btw. are you aware that gulp-install
is blacklisted in http://gulpjs.com/plugins/ ?
@heikki thanks! Submitted an issue for removing it from the blacklist now.
@mde I think you're right. I will change how gulp-install
behaves and make it run as usual even when NODE_ENV=test
. Will think of a better way to disable the install in tests if one wants to... :)
On our CI server, our app is built and run (naturally enough) with the NODE_ENV of 'test'. This causes the gulp-install plugin to stop functioning because it thinks it's running its own tests. 'test' and 'testing' are probably pretty common NODE_ENV values for CI server environments, so it might be a good idea to use something more specific as a flag. Maybe GULP_INSTALL_TEST?