This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/gulp-tasks/styles.js

17 lines
808 B
JavaScript

module.exports = function (gulp, plugins, config, sourceFiles, outputFile) {
return function () {
return gulp.src(sourceFiles)
.pipe(plugins.plumber())
.pipe(plugins.if(!config.production, plugins.sourcemaps.init()))
.pipe(plugins.sassGlob())
.pipe(plugins.sass())
.pipe(plugins.autoprefixer(config.sass.autoprefixer))
.pipe(plugins.concat(outputFile))
.pipe(plugins.if(config.production, plugins.purifycss(config.sass.purifyCss)))
.pipe(plugins.if(config.production, plugins.cleanCss()))
.pipe(plugins.if(!config.production, plugins.sourcemaps.write('.')))
.pipe(plugins.if(!config.production, plugins.refresh()))
.pipe(gulp.dest(config.sass.outputDir));
}
}