gulp-filter

CSS and JS minification doesn't work with gulp-filter, gulp-csso, gulp-uglify

纵饮孤独 提交于 2020-01-13 20:31:12
问题 I'm working thorough johnpapa's course on automation with Gulp and seem to hit a weird wall: when I'm trying to run the CSS and JS concatenation and minification task it fails to do the minification. This is the task: gulp.task('optimize', ['inject'], function () { var assets = $.useref.assets({searchPath: ''}); var cssFilter = $.filter(['**/*.css'], {restore: true}); var jsFilter = $.filter(['**/*.js'], {restore: true}); return gulp .src(config.indexFile) .pipe($.rename('test.jsp')) .pipe($

gulp-filter filters out all files

与世无争的帅哥 提交于 2019-12-10 20:48:30
问题 I'm working on moving my workflow over to Gulp, and I'm loving it so far; however, I seem to have misunderstood something about how the gulp-filter plugin works... I have the following task: gulp.task('assets', function() { var stylesFilter = gulpFilter(stylesPath); var imagesFilter = gulpFilter(imagesPath); var scriptsFilter = gulpFilter(scriptsPath); return gulp.src([].concat('app/**/*.html', stylesPath, imagesPath, scriptsPath)) // STYLES .pipe(stylesFilter) .pipe(gulp.dest('dist/test

CSS and JS minification doesn't work with gulp-filter, gulp-csso, gulp-uglify

佐手、 提交于 2019-12-06 05:16:04
I'm working thorough johnpapa's course on automation with Gulp and seem to hit a weird wall: when I'm trying to run the CSS and JS concatenation and minification task it fails to do the minification. This is the task: gulp.task('optimize', ['inject'], function () { var assets = $.useref.assets({searchPath: ''}); var cssFilter = $.filter(['**/*.css'], {restore: true}); var jsFilter = $.filter(['**/*.js'], {restore: true}); return gulp .src(config.indexFile) .pipe($.rename('test.jsp')) .pipe($.plumber()) .pipe(assets) .pipe(cssFilter) .pipe($.csso()) .pipe(cssFilter.restore) .pipe(jsFilter)