This is a user sandbox of Gulp.js. You can use it for testing or practicing edits. This is not the place where you work on your assigned article for a dashboard.wikiedu.org course. Visit your Dashboard course page and follow the links for your assigned article in the My Articles section. |
This template should only be used in the user namespace.This template should only be used in the user namespace.
{{Infobox Software
| Logo =
| Manufacturer = Fractal and contributors of the GitHub community
| Current version = <!- Versions please insert intermittently ->
4.0.0 & nbsp; Cite error: A <ref>
tag is missing the closing </ref>
(see the help page). For this must first return to the required gulp-uglify plugin [1] on npm installed and at the beginning of gulpfile.js define the module. <syntax highlight lang = "javascript ">
// Script task
gulp.task ( 'scripts', function () {
gulp.src ( 'scripts / *. js')
.pipe (uglify ())
.pipe (gulp.dest ( 'scripts /'));
});
</ Syntax highlight>
=== === 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. <Syntax highlight lang = "javascript">
// Rerun the task When a file changes
gulp.task ( 'watch', function () {
gulp.watch ( '. scripts / js **', [ 'scripts']);
gulp.watch ( 'images-orig / **', [ 'images']);
});
</ Syntax highlight>
Furthermore, it is possible to accomplish an update of the browser content using the Watch-tasks [2] For this, there are numerous options and plugins.
Literature
- Empty citation (help)
- "Build Tools and Automation", pp. 400–408 Unknown parameter
|Publisher=
ignored (|publisher=
suggested) (help); Unknown parameter |Title=
ignored (|title=
suggested) (help); Unknown parameter |Year=
ignored (|year=
suggested) (help); Unknown parameter |Author=
ignored (|author=
suggested) (help); Unknown parameter |Edition=
ignored (|edition=
suggested) (help); Missing or empty |title=
(help)
Links
References
- ^ [https: / /www.npmjs.com/package/gulp-uglify gulp-uglify plugin]
- ^ [https:. //www.browsersync.io/docs/gulp/ https:. //www.browsersync.io/docs/gulp/].
{{cite web}}
: Check |url=
value (help); Cite has empty unknown parameter: |factory=
(help); Missing or empty |title=
(help); Unknown parameter |=
ignored (help); Unknown parameter |Title=
ignored (|title=
suggested) (help); Unknown parameter |access=
ignored (|access-date=
suggested) (help)