.pipe(changed(config.html.dest, { extension: ".html" }))
Level1, remove units when not required, turn rgb colors to a shorter hex representation, remove comments, etc; Level 2 remove duplicate rules, remove properties redefined further down a stylesheet, or restructure rules by moving them around.
Pozwala użyć dyrektywy do inkludowania plików. Alternatywa dla pugjs
@@include('./view.html')Filter and restore stream
const f = filter(['**', '!*src/vendor'], {restore: true});
gulp.src('src/**/*.js')
.pipe(f)
.pipe(uglify())
.pipe(f.restore)
.pipe(gulp.dest('dist'));
A ternary gulp plugin: conditionally control the flow of vinyl objects.
.pipe(gulpif(!mode.production, sourcemaps.init()))
Minify PNG, JPEG, GIF and SVG images with imagemin
.pipe(imagemin({
progressive: true,
svgoPlugins: [
{ removeViewBox: false },
{ cleanupIDs: false },
],
use: [
pngquant(),
],
}))
Send messages to Mac Notification Center, Linux notifications (using notify-send)
Prevent pipe breaking caused by errors from gulp plugins
.pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') }))
.pipe(prompt.confirm({
message: 'Heads Up! Check ../config.json & Confirm deploy',
default: false,
}))
gulp-remember pairs nicely with gulp-cached when you want to only rebuild the files that changed, but still need to operate on all files in the set.
Autodeploy, przydaje się do wywołania scp, rsync, git
Display a report of the size and Gzipped size of your project
Umożliwia wygodne debugowanie kodu w konsoli przeglądarki
takes a bunch of SVG files, optimizes them and bakes them into SVG sprites of several types
PostCss, remove unused css
Utility functions for gulp plugins
czym to się różni od funkcji watch eksportowanej przez gulp?
ostatnia aktualizaca 2016 rok,
Bower - A package manager for the web, deprecated
we recommend yarn and webpack or parcel for new front-end projects!
adapted from event-stream separated into a new module, using Streams3.
converting glob expressions into JavaScript RegExp objects.
"Globs" are the patterns you type when you do stuff like ls *.js on the command line, or put build/* in a .gitignore file.