Ignoring bower_components while including css and javascript files
gulp.task('files', function(){
var target = gulp.src("./client/index.html");
var sources = gulp.src(["./client/**/*.js", "./client/**/*.css"], {read: false});
target.pipe(inject(sources))
.pipe(gulp.dest("./client"))
});
I don't want to include client/bower_components in my index.html? Is there a way i can specify what files to include in my sources?
https://github.com/klei/gulp-inject#optionsignorepath
Exclude the bower_components like this.
var sources = gulp.src(["!./client/bower_components/**/*"
"./client/**/*.js", "./client/**/*.css"], {read: false});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With