gulp-useref
gulp-useref copied to clipboard
Question: No Concat and re-concat
Has anyone used the noconcat option to modify the stream contents, and then successfully concatenated back into the correctly named files (for multiple blocks) ?
I want to modify a file in the stream before it gets concatenated -- and i don't quite see a way to do this yet.
I would also like to know this
Post your code.
Hi, also interesting in solution, here is code example
gulp.task('index', function () {
var assets = $.useref.assets({
noconcat: true
});
return gulp.src('./*.html')
.pipe(assets)
.pipe($.if('*.js', $.ngAnnotate()))
.pipe($.if(/.*[^\.min].js/, $.uglify()))
.pipe($.if('*.css', $.minifyCss({keepSpecialComments: 0})))
.pipe(assets.restore())
.pipe($.useref())
// Output files
.pipe(gulp.dest(buildDir))
.pipe($.size({title: 'index'}));
});
I want to concat files after minimize some of them. Can I do this without additional tasks?
This might help https://github.com/jonkemp/gulp-useref/issues/136