Commit 3a72068e authored by Pascal Hartig's avatar Pascal Hartig

Add vulcanize to build suite

parent 8d068c21
...@@ -43,6 +43,7 @@ gulp.task('copy', function () { ...@@ -43,6 +43,7 @@ gulp.task('copy', function () {
'architecture-examples/**', 'architecture-examples/**',
'dependency-examples/**', 'dependency-examples/**',
'vanilla-examples/**', 'vanilla-examples/**',
'bower_components/**',
'labs/**', 'labs/**',
'learn.json', 'learn.json',
'CNAME', 'CNAME',
...@@ -78,10 +79,12 @@ gulp.task('html', function () { ...@@ -78,10 +79,12 @@ gulp.task('html', function () {
.pipe($.if('*.css', $.csso())) .pipe($.if('*.css', $.csso()))
.pipe(assets.restore()) .pipe(assets.restore())
.pipe($.useref()) .pipe($.useref())
// Minify Any HTML
.pipe($.if('*.html', $.minifyHtml()))
// Output Files // Output Files
.pipe(gulp.dest('dist')) .pipe(gulp.dest('dist'))
// Running vulcanize over the written output
// because it requires access to the written
// CSS and JS.
.pipe($.vulcanize({ dest: 'dist', strip: true }))
.pipe($.size({title: 'html'})); .pipe($.size({title: 'html'}));
}); });
...@@ -90,7 +93,7 @@ gulp.task('clean', del.bind(null, ['.tmp', 'dist'])); ...@@ -90,7 +93,7 @@ gulp.task('clean', del.bind(null, ['.tmp', 'dist']));
// Build Production Files, the Default Task // Build Production Files, the Default Task
gulp.task('default', ['clean'], function (cb) { gulp.task('default', ['clean'], function (cb) {
runSequence('styles', ['jshint', 'html', 'images', 'copy'], cb); runSequence(['styles', 'copy'], ['jshint', 'html', 'images'], cb);
}); });
// Run PageSpeed Insights // Run PageSpeed Insights
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment