I've been using grunt task runner in all of the angular projects I was involved in.
Currently, I found a gulp-protractor-qa
plugin for gulp that watches all my element selectors in the tests on the fly. It is good at what it does, but now I have to have a separate gulpfile.js
config for the another build system (I cannot find an appropriate alternative among grunt
plugins).
Is it okay to use both grunt
and gulp
build systems in a single project? What are the generally accepted actions in this case?
gulp-protractor-qa
is just an example. I can imagine this would hit me again when I would need different suitable plugins in both build systems and would have to make a choice: try to sit on two chairs?
Gulp vs Grunt: Speed The reason for Gulp's current speed advantage is down to the fact that Gulp uses streams and handles tasks in memory, which means that only one file is written. Furthermore, Gulp can process several tasks at the same time, but Grunt will normally only handle one task at a time.
gulp and Grunt are task runners. They are different approaches to same problem. Grunt uses configuration based approach, while gulp uses streams from node to achieve result. You use them to define how and which tasks to execute (copying files, adding banners, replacing text, style checking, etc...).
So task runners like Grunt and Gulp still have their place and we still use both here at Delicious Brains as build tools for different products we develop.
Grunt is a JavaScript task runner, a tool used to automatically perform frequent tasks such as minification, compilation, unit testing, and linting. It uses a command-line interface to run custom tasks defined in a file (known as a Gruntfile). Grunt was created by Ben Alman and is written in Node. js.
Like you said, if you don't have any other alternative with grunt
, I think that the need of using both task runners is real until an equivalent solution is found or created.
You should of course take care of the possible overrides and conflicts that comes with each task you add in gulp
, and to me, never mix your watchers
. Always choose to use them in one or the other runner cause of the infinite loops. Even if in this case with gulp-protractor-qa
you are watching files, there is no dependent task which runs and nothing is written so you should be fine.
Also, since the new dependencies will mainly be the dev
ones, the performance of your deployed app will be very slightly affected or not, except if you run your tests on each deploy, that may take a little longer to install them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With