Gulp.js: Difference between revisions

Content deleted Content added
Stiruma (talk | contribs)
m grammatical changes
Stiruma (talk | contribs)
m grammatical errors
Line 15:
 
== Overview ==
gulp.js is a build tool in JavaScript built on node streams. TheThese streams facilitate the connection of file operations through pipelines. gulp reads the file system and pipes the data at hand from its one single purposed plugin to other through pipes doing one task at a time. The original files are not affected until all the plugins are processed. It can be configured either to modify the original files or create new ones. This grants the ability to perform complex tasks through linking its myriad of plugins. The users can also write their own plugins to define their own tasks. gulp requires knowledge on JavaScript and coding to define its tasks. gulp is a build system which means aside from running tasks it is also capable of copying files from one ___location to another, compiling, deploying, creating notifications, unit testing, linting etc.
 
== gulp vs Grunt ==
Both Grunt and gulp are task runners in JavaScript built on node. Grunt runs tasks by transforming files and savesaves as new ones in temporary folders. The output of one task is taken as input for another one and on until it reaches the destination folder. This involves a lot of I/O calls and many temporary files. Whereas gulp streams through the file system and does not require these temporary locations. Since it streams the data it also decreases the number of I/O calls and also improves performance. Grunt uses configuration files to perform tasks whereas gulp requires its build file to consist of code. In grunt, each plugin needs to be configured to match its input ___location to the previous plugin’s output. In gulp, the theyplugins are automatically pipe-lined.
 
== Installation ==
 
Gulpgulp needs [[Node.js]] and can be installed by the [[Node Package Manager]]. To remove a previously installed gulp the command used is <code>npm rm --global gulp</code>.
 
Install gulp globally, then initialize the project directory and install in the project locally. While installing the project locally, package.json file must already exist in the selected directory.