Gulp.js: Difference between revisions

Content deleted Content added
Stiruma (talk | contribs)
Operations elaborated. gulpfile anatomy is added. Image tasks is elaborated
Stiruma (talk | contribs)
Line 41:
gulpfile is the place where all the operations are defined in gulp. The basic anatomy of the gulpfile consists of required plugins included at the top, definition of the tasks and a default task at the end.
 
==== Plugins: ====
Any installed plugin that is required to perform a task is to be added at the top of the gulpfile as a depedency in the following format. <syntaxhighlight lang="javascript">
//Adding dependencies
Line 48:
</syntaxhighlight>
 
==== Tasks: ====
The tasks can then be created. A gulp task is defined by ''gulp.task'' and takes the name of the task as the first parameter and a function as the second parameter.