Created
October 18, 2017 08:11
-
-
Save arafathusayn/d4af44edf8e2102873e08af375a40b1a to your computer and use it in GitHub Desktop.
Laravel View Files Minification (HTML, CSS & JS) with Gulp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// > gulp minify | |
const htmlmin = require('gulp-htmlmin') | |
const gulp = require('gulp') | |
gulp.task('minify', () => { | |
const opts = { | |
collapseWhitespace: true, | |
removeAttributeQuotes: true, | |
removeComments: true, | |
minifyCSS: true, | |
minifyJS: true | |
} | |
return gulp.src('./storage/framework/views/*') | |
.pipe(htmlmin(opts)) | |
.pipe(gulp.dest('./storage/framework/views/')) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment