Gulp.js: Difference between revisions

Content deleted Content added
Line 23:
 
== Need for a task runner ==
Task-runners like gulp and [[Grunt (software)|grunt]] are built on node becauserather the basicthan [[Node Package Manager|npm]] scriptsis arebecause notthe efficientbasic whennpm itscripts comesare toinefficient when executing multiple tasks.
Even though a fewsome developers prefer [[Node Package Manager|npm]] scripts tobecause they can be simple and easy to implement, there are numerous ways where gulp and grunt seem to have an advantage over each other and the default provided scripts.<ref name="gulpjs/gulp">{{cite web|url=https://github.com/gulpjs/gulp/blob/master/docs/CLI.md|title=gulpjs/gulp|website=GitHub|access-date=2016-09-23}}</ref> Grunt runs tasks by transforming files and saves as new ones in temporary folders and the output of one task is taken as input for another and so on until the output reaches the destination folder. This involves a lot of [[I/O]] calls and creation of many temporary files. Whereas gulp streams through the file system and does not require any of these temporary locations decreasing the number of I/O calls thus, improving performance.<ref>{{cite web|url=https://css-tricks.com/gulp-for-beginners/ |title=Gulp for Beginners |publisher=CSS-Tricks |date=2015-09-01 |accessdate=2016-12-14}}</ref> Grunt uses configuration files to perform tasks whereas gulp requires its build file to be coded. In grunt, each plugin needs to be configured to match its input ___location to the previous plugin’s output. In gulp, the plugins are automatically pipe-lined.<ref name="github.com"/>
 
== Operation ==