Gulp.js: Difference between revisions

Content deleted Content added
Fix code formatting + update plugin count
various.
Line 15:
| license = [[MIT License]]<ref>{{cite web|url=https://github.com/gulpjs/gulp/blob/master/LICENSE|title=License to github.com | language=en | accessdate = 2016-05-30}}</ref>
|name=gulp}}
'''gulp''' is an [[Open-source software|open-source]] [[JavaScript]] toolkit created by Eric Schoffstall<ref name=":0">{{Cite book|title=Developing a Gulp Edge|publisher=Bleeding Edge Press|year=2014|isbn=978-1-939902-14-6|edition=1st|___location=|pages=|via=|author1=Jed Mao |author2=Maximilian Schmitt |author3=Tomasz Stryjewski |author4=Cary Country Holt |author5=William Lubelski }}</ref> used as a streaming [[build system]]( similar to a more package-focussed [[Make (software)|Make]]) in [[front-end web development]].
 
It is a task runner built on [[Node.js]] and [[npm (software)|npm]], used for automation of time-consuming and repetitive tasks involved in web development like [[Minification (programming)|minification]], concatenation, cache busting, [[unit testing]], [[Linting software|linting]], optimization, etc.<ref>{{cite web|url=https://www.smashingmagazine.com/2014/06/building-with-gulp/ |title=Building With Gulp – Smashing Magazine |website=Smashingmagazine.com |date= |accessdate=2016-12-14}}</ref>
Line 29:
 
== Operation ==
The gulp tasks are run from a [[command-line interface]] (CLI)<ref name="gulpjs/gulp"/> shell and require two files, <big><code>package.json</code>, which is used to list the various plugins for gulp,</big> and <code>gulpfile.js</code> (or simply <code>gulpfile</code>), These, as per build tool convention, are often found in the project root directory of the package's source code. The gulpfile iscontains wheremost pluginsof arethe loadedlogic andthat tasksgulp areneeds definedto run it's build tasks. First, all the necessary modules are loaded and then tasks are defined in the gulpfile. All the necessary plugins specified in the gulpfile are installedlisted intoin the devDependencies. section of <ref name=":2">{{cite web|url=https://docs.npmjs.com/cli/install|title=install {{!}} npm Documentation|website=docs.npmjs.com|access-date=2016-09-22}}</ref> The default task runs by <code>$gulp</code>. Individual tasks can be defined by gulp.task and are run by <code>gulp <task> <othertask></code>.<ref name=":1">{{cite web|url=https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md|title=gulpjs/gulp|website=GitHub|access-date=2016-09-23}}</ref> Complex tasks are defined by chaining the plugins with the help of <code>.pipe()</code> operator.<ref name=":3" />
 
== Anatomy of gulpfile ==