diff --git a/gulp-tasks/styles.js b/gulp-tasks/styles.js index fe21c5f0..66dae1c0 100644 --- a/gulp-tasks/styles.js +++ b/gulp-tasks/styles.js @@ -5,16 +5,9 @@ module.exports = function (gulp, plugins, config, sourceFiles, outputFile) { .pipe(plugins.if(!config.production, plugins.sourcemaps.init())) .pipe(plugins.sassGlob()) .pipe(plugins.sass()) - .pipe(plugins.autoprefixer({ - browsers: ["last 2 versions", "> 5%"], - cascade: false - })) + .pipe(plugins.autoprefixer(config.sass.autoprefixer)) .pipe(plugins.concat(outputFile)) - .pipe(plugins.if(config.production, plugins.purifycss([ - 'source/**/*.html', - 'source/**/*.md', - 'source/**/*.twig', - ]))) + .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())) diff --git a/gulpfile.config.js b/gulpfile.config.js index 3255c81d..c9fb4643 100644 --- a/gulpfile.config.js +++ b/gulpfile.config.js @@ -1,8 +1,17 @@ module.exports = function (plugins) { return { sass: { + autoprefixer: { + browsers: ["last 2 versions", "> 5%"], + cascade: false + }, sourceDir: "assets/sass", pattern: "/**/*.sass", + purifyCss: [ + 'source/**/*.html', + 'source/**/*.md', + 'source/**/*.twig' + ], outputDir: "source/assets/css" }, fonts: {