Skip to content
Snippets Groups Projects
Commit 82ca7919 authored by wbagdon's avatar wbagdon Committed by GitHub
Browse files

Run less before minift-css

Sometimes minify-css can run before less since they are parallel tasks
Make minify-css wait for the completion of less so the freelancer.min.css file is always generated.
Otherwise gulp needs to be run twice to ensure an updated *.min.css file
parent ed649c25
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ gulp.task('less', function() { ...@@ -32,7 +32,7 @@ gulp.task('less', function() {
}); });
// Minify CSS // Minify CSS
gulp.task('minify-css', function() { gulp.task('minify-css', ['less'], function() {
return gulp.src('css/freelancer.css') return gulp.src('css/freelancer.css')
.pipe(cleanCSS({ compatibility: 'ie8' })) .pipe(cleanCSS({ compatibility: 'ie8' }))
.pipe(rename({ suffix: '.min' })) .pipe(rename({ suffix: '.min' }))
...@@ -99,4 +99,4 @@ gulp.task('dev', ['browserSync', 'less', 'minify-css', 'minify-js'], function() ...@@ -99,4 +99,4 @@ gulp.task('dev', ['browserSync', 'less', 'minify-css', 'minify-js'], function()
// Reloads the browser whenever HTML or JS files change // Reloads the browser whenever HTML or JS files change
gulp.watch('*.html', browserSync.reload); gulp.watch('*.html', browserSync.reload);
gulp.watch('js/**/*.js', browserSync.reload); gulp.watch('js/**/*.js', browserSync.reload);
}); });
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment