gulp-changed-enhancements
v1.4.5
Published
Plugin for gulp-changed, provide custom comparators for CSS, JS (ES6), and Pug
Downloads
6
Maintainers
Readme
Plugin for gulp-changed, provide custom comparators for CSS, JS (ES6), and Pug
Only pass through if file changed or file from which it depends.
Using
For JS
return gulp.src(`${src}/*.{js,jsx}`)
.pipe($.changed(dist, {
hasChanged: require('gulp-changed-enhancements').compareLastModifiedTimeJSDeps,
extension: '.js'
}))
....
For CSS
return gulp.src(`${src}/*.{css,sss}`)
.pipe($.changed(dist, {
hasChanged: require('gulp-changed-enhancements').compareLastModifiedTimeCSSDeps,
extension: '.css'
}))
....
For Pug
return gulp.src(`${src}/*.{pug}`)
.pipe($.changed(dist, {
hasChanged: require('gulp-changed-enhancements').compareLastModifiedTimePugDeps,
extension: '.html'
}))
....
Or you can use this plugin for other files
return gulp.src(`${src}/*.sass`)
.pipe($.changed(dist, {
hasChanged: require('gulp-changed-enhancements').compareLastModifiedTimeWithDeps({
extensions: ['.sass','.scss'],
regex: /@import\s+(["'])(.*?)(["'])/gm,
regexElement: 2
}),
extension: '.css'
}))
....