Skip to content

Instantly share code, notes, and snippets.

@AkshayRana92
Created July 8, 2017 17:45
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/892e09eadc163a57748898412464ef89 to your computer and use it in GitHub Desktop.
Save AkshayRana92/892e09eadc163a57748898412464ef89 to your computer and use it in GitHub Desktop.
var gzip = require('gulp-gzip'); //Add dependency to package.json if not added
gulp.task('gzip-app', function () {
gulp.src(['dist/prod/src/app/bundle.min.js'])
.pipe(gzip())
.pipe(gulp.dest('dist/prod/src/app'));
});
gulp.task('gzip-css', function () {
gulp.src(['dist/prod/src/assets/css/vendor.css'])
.pipe(gzip())
.pipe(gulp.dest('dist/prod/src/assets/css'));
});
gulp.task('gzip-vendorjs', function () {
gulp.src(['dist/prod/src/assets/js/*.*'])
.pipe(gzip())
.pipe(gulp.dest('dist/prod/src/assets/js'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment