Created
December 20, 2019 08:00
-
-
Save tterb/9f4aa17c8b54b7abe1da0fb498537400 to your computer and use it in GitHub Desktop.
Gulpfile clean
This file contains 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
// Delete CSS | |
gulp.task('clean:styles', function(callback) { | |
del([paths.jekyllCssFiles + 'main.css', | |
paths.siteCssFiles + 'main.css', | |
'_includes/critical.css' | |
]); | |
callback(); | |
}); | |
// Delete processed JS | |
gulp.task('clean:scripts', function(callback) { | |
del([paths.jekyllJsFiles + 'main.js', paths.siteJsFiles + 'main.js']); | |
callback(); | |
}); | |
// Delete processed images | |
gulp.task('clean:images', function(callback) { | |
del([paths.jekyllImageFiles, paths.siteImageFiles]); | |
callback(); | |
}); | |
// Delete processed font files | |
gulp.task('clean:fonts', function(callback) { | |
del([paths.jekyllFontFiles, paths.siteFontFiles]); | |
callback(); | |
}); | |
// Delete the entire _site directory | |
gulp.task('clean:jekyll', function(callback) { | |
del(['_site']); | |
callback(); | |
}); | |
// Deletes _site directory and processed assets | |
gulp.task('clean', ['clean:jekyll', 'clean:styles', 'clean:scripts', 'clean:images', 'clean:fonts', 'clean:downloads'] | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment