Skip to content
This repository has been archived by the owner on Jul 21, 2019. It is now read-only.

Commit

Permalink
Remove useref from gulpfile
Browse files Browse the repository at this point in the history
Can’t quite get it to work

Signed-off-by: Matt Stratton <[email protected]>
  • Loading branch information
mattstratton committed Jan 9, 2017
1 parent 72f257b commit 3735483
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,32 @@ var gulp = require('gulp'),

gulp.task('useref', function(){
return gulp.src('public/**/*.html')
.pipe(useref({ searchPath: ['public/css', 'public/font-awesome'] }))
.pipe(useref({ searchPath: ['../static/']}))
.pipe(gulpif('*.js', uglify()))
.pipe(gulpif('*.css', minifyCss()))
.pipe(gulpif('*.html', htmlmin({collapseWhitespace: true})))
.pipe(gulp.dest('staging'));
});

gulp.task('min-js', function(){
return gulp.src('public/**/*.js')
.pipe(uglify())
.pipe(gulp.dest('staging'));
});

gulp.task('min-css', function(){
return gulp.src('public/**/*.css')
.pipe(minifyCss())
.pipe(gulp.dest('staging'));
});

gulp.task('min-html', function(){
return gulp.src('public/**/*.html')
.pipe(htmlmin({collapseWhitespace: true}))
.pipe(gulp.dest('staging'));
});


// The process-images task took about 6 minutes for just sponsors; for now we probably
// will just copy the images and not optimize them

Expand Down Expand Up @@ -60,7 +79,7 @@ gulp.task('copy-icons', function(){
});

gulp.task('default', function (callback) {
runSequence('useref', 'copy-images', 'process-files', 'update-files', 'copy-other-files', 'copy-icons',
runSequence('min-js', 'min-css', 'min-html', 'copy-images', 'process-files', 'update-files', 'copy-other-files', 'copy-icons',
callback
)
})

0 comments on commit 3735483

Please sign in to comment.