Move autoprefixer and purifyCss settings
This commit is contained in:
parent
f7dee6b6f2
commit
2c4f8036c2
|
@ -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()))
|
||||
|
|
|
@ -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: {
|
||||
|
|
Reference in a new issue