-
Notifications
You must be signed in to change notification settings - Fork 1
/
postcss.config.js
53 lines (51 loc) · 1.27 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import postcssImport from "postcss-import";
import autoprefixer from "autoprefixer";
import purgecss from "@fullhuman/postcss-purgecss";
import perfectionist from "perfectionist";
import presetEnv from "postcss-preset-env";
const config = {
atImport: {
path: [
"tailwind.config.js",
"assets/css/*.pcss",
"assets/css/**/*.pcss",
"assets/css/",
],
},
perfectionist: {
cascade: false,
indentSize: 2,
trimLeadingZero: false,
maxAtRuleLength: false,
maxSelectorLength: 1,
maxValueLength: false,
},
purgecss: {
content: [
"**/*.php",
"./views/**/*.twig",
"./assets/**/*.pcss",
"./assets/**/*.svg",
"./assets/**/*.js"
],
extractors: [{
extensions: ["php", "twig", "pcss", "svg", "js"],
extractor: class TailwindExtractor {
static extract(content) {
return content.match(/[A-Za-z0-9-_:/]+/g) || [];
}
},
}],
// whitelist: purgecssWordpress.whitelist,
// whitelistPatterns: purgecssWordpress.whitelistPatterns.concat([]),
},
};
export default {
plugins: [
autoprefixer({ cascade: false }),
presetEnv({ stage: 0 }),
postcssImport(config.atImport),
purgecss(config.purgecss),
perfectionist(config.perfectionist),
]
};