generated from woodcox/primitive-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 2
/
postcss.config.js
28 lines (25 loc) 路 840 Bytes
/
postcss.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// postcss.config.js
const autoprefixer = require('autoprefixer');
const cssnanoConfig = {
autoprefixer: false,
discardComments: {removeAll: true},
svgo: true
};
const cssnano = require('cssnano')({
preset: ['default', { cssnanoConfig }]
});
const purgecss = require('@fullhuman/postcss-purgecss')({
content: ['**/*.js', './_includes/**/*.svg', './_layouts/*.html', './pages/**/*.md', './pages/**/*.html', './pages/*.md', './pages/*.html', './*.html'],
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
css: ['city.css'],
safelist: {
standard: ['::-webkit-scrollbar', '::-webkit-scrollbar-thumb', '::-webkit-scroll-track', 'gradient-text'],
greedy: [/^bg-/]
}
});
module.exports = {
plugins: [
autoprefixer,
...(process.env.NODE_ENV === "production" ? [cssnano] : [])
],
};