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.if(!config.production, plugins.sourcemaps.init()))
|
||||||
.pipe(plugins.sassGlob())
|
.pipe(plugins.sassGlob())
|
||||||
.pipe(plugins.sass())
|
.pipe(plugins.sass())
|
||||||
.pipe(plugins.autoprefixer({
|
.pipe(plugins.autoprefixer(config.sass.autoprefixer))
|
||||||
browsers: ["last 2 versions", "> 5%"],
|
|
||||||
cascade: false
|
|
||||||
}))
|
|
||||||
.pipe(plugins.concat(outputFile))
|
.pipe(plugins.concat(outputFile))
|
||||||
.pipe(plugins.if(config.production, plugins.purifycss([
|
.pipe(plugins.if(config.production, plugins.purifycss(config.sass.purifyCss)))
|
||||||
'source/**/*.html',
|
|
||||||
'source/**/*.md',
|
|
||||||
'source/**/*.twig',
|
|
||||||
])))
|
|
||||||
.pipe(plugins.if(config.production, plugins.cleanCss()))
|
.pipe(plugins.if(config.production, plugins.cleanCss()))
|
||||||
.pipe(plugins.if(!config.production, plugins.sourcemaps.write('.')))
|
.pipe(plugins.if(!config.production, plugins.sourcemaps.write('.')))
|
||||||
.pipe(plugins.if(!config.production, plugins.refresh()))
|
.pipe(plugins.if(!config.production, plugins.refresh()))
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
module.exports = function (plugins) {
|
module.exports = function (plugins) {
|
||||||
return {
|
return {
|
||||||
sass: {
|
sass: {
|
||||||
|
autoprefixer: {
|
||||||
|
browsers: ["last 2 versions", "> 5%"],
|
||||||
|
cascade: false
|
||||||
|
},
|
||||||
sourceDir: "assets/sass",
|
sourceDir: "assets/sass",
|
||||||
pattern: "/**/*.sass",
|
pattern: "/**/*.sass",
|
||||||
|
purifyCss: [
|
||||||
|
'source/**/*.html',
|
||||||
|
'source/**/*.md',
|
||||||
|
'source/**/*.twig'
|
||||||
|
],
|
||||||
outputDir: "source/assets/css"
|
outputDir: "source/assets/css"
|
||||||
},
|
},
|
||||||
fonts: {
|
fonts: {
|
||||||
|
|
Loading…
Reference in a new issue