aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/gulpfile.js b/gulpfile.js
index 5a3c2478..f360b779 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -12,6 +12,8 @@ const concat = require('gulp-concat');
const filter = require('gulp-filter');
const sass = require('gulp-sass');
const cleancss = require('gulp-clean-css');
+const postcss = require('gulp-postcss');
+const customprops = require('postcss-custom-properties');
const header = require('gulp-header');
const prefix = require('gulp-autoprefixer');
const gitbranch = require('git-branch');
@@ -91,13 +93,13 @@ const babelrc = (polyfill = false) => ({
presets: [
[
'@babel/preset-env',
- {
- targets: {
- browsers,
- },
- useBuiltIns: polyfill ? 'usage' : false,
- modules: false,
+ {
+ targets: {
+ browsers,
},
+ useBuiltIns: polyfill ? 'usage' : false,
+ modules: false,
+ },
],
],
babelrc: false,
@@ -161,6 +163,7 @@ const build = {
.on('error', gutil.log)
.pipe(concat(key))
.pipe(prefix(browsers, { cascade: false }))
+ .pipe(postcss([customprops()]))
.pipe(cleancss())
.pipe(size(sizeOptions))
.pipe(gulp.dest(paths[bundle].output)),
@@ -179,7 +182,7 @@ const build = {
svgmin({
plugins: [
{
- removeDesc: true,
+ removeDesc: true,
},
],
}),