Gulp.js: Difference between revisions

Content deleted Content added
Updated latest release to 5.0.0
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
Line 112:
The subsequent image task optimizes images. <Code>gulp.src()</code> retrieves all the images with the extension .png, .gif or .jpg in the directory '''images-orig/'.''
 
<Code>.pipe(imagemin())</Code> channels the images found, through the optimization process and with <code>.pipe(gulp.dest())</code> the optimized images are saved to the '''images/' folder''. Without <code>gulp.dest()</code> the images would indeed be optimized, but are not stored.<ref>{{cite web |url=http://magazin.phlow.de/webdesign/gulp/ |title=Durchstarten mit Gulp.js – Websites optimieren, Arbeitsabläufe automatisieren |website=Magazin.phlow.de |date=2014-05-25 |access-date=2016-12-14 |archive-date=2017-06-16 |archive-url=https://web.archive.org/web/20170616233539/http://magazin.phlow.de/webdesign/gulp/ |url-status=dead }}</ref> Since the optimized images are stored to another folder, the original images remain unaltered.<ref name=":3">{{Cite book|title=Getting Started with Gulp|last=Maynard|first=Travis|publisher=Packt Publishing Ltd|year=2015|isbn=9781784393472}}</ref><syntaxhighlight lang="javascript">
// Images task
gulp.task('images', function () {