Skip to content

Instantly share code, notes, and snippets.

@AkshayRana92
Created July 8, 2017 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AkshayRana92/4faae4776a1c9747c91974b76d041827 to your computer and use it in GitHub Desktop.
Save AkshayRana92/4faae4776a1c9747c91974b76d041827 to your computer and use it in GitHub Desktop.
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