Content deleted Content added
Visaldatta (talk | contribs) No edit summary |
Visaldatta (talk | contribs) No edit summary |
||
Line 54:
== Example tasks ==
=== Image Task ===
For the following example, the '' gulp-imagemin plugin '' <ref>[https://www.npmjs.com/package/gulp-imagemin/gulp-imagemin Plugin]</ref> required. For this, by running the command <code> {{lang | npm install --save-dev-gulp imagemin} | s} </code> installed the required plug-in shell.
Line 71:
</syntaxhighlight>
=== Scripts Task ===
In the following example, all JavaScript files from the directory '' <nowiki/> 'scripts/' <nowiki/> '' <code> .pipe (uglify ()) </code> and optimized with <code> gulp. least ( 'scripts/') </code> overwritten <ref> {{Internet source | url = https://liechtenecker.at/front-end-workflow-mit-gulp/| title = front-end workflow with Gulp | author = | = ed | factory = | date = | language = | access = 2016-05-30}} </ref> For this must first return to the required '' gulp-uglify plugin '' <ref> [https://www.npmjs.com/package/gulp-uglify gulp-uglify plugin] </ref> on '' npm '' installed and at the beginning of '' gulpfile.js '' define the module. <syntaxhighlight lang = "javascript">
//Script task
Line 81:
</syntaxhighlight>
=== Watch Task ===
The Watch-task serves to react to changes of files. In the following example, the tasks of the names are '' scripts '' and '' images '' called when it JavaScript files or images should change in the specified directories. <syntaxhighlight lang = "javascript">
// Rerun the task When a file changes
|