Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var replace = require('gulp-replace'); //Add dependency to package.json if not added
gulp.task('index-build', function () {
gulp.src('index.html')
.pipe(inject(gulp.src('dist/prod/src/assets/css/vendor.css'), {name: 'styles'}))
.pipe(inject(gulp.src('dist/prod/src/assets/js/vendor.js'), {name: 'scripts'}))
.pipe(replace('/dist/prod/src/assets/css/vendor.css', 'assets/css/vendor.css'))
.pipe(replace('/dist/prod/src/assets/js/vendor.js', 'assets/js/vendor.js'))
.pipe(gulp.dest('dist/prod/src'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment