Use Taliwind's purge option
This commit is contained in:
parent
347d5fdbcf
commit
370b236de2
|
@ -1,12 +1,12 @@
|
|||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en-US">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
||||
<title>Tailwind Jekyll Starter Kit</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/style.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body></body>
|
||||
</html>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import purgecss from "@fullhuman/postcss-purgecss";
|
||||
import autoprefixer from "autoprefixer";
|
||||
import browserSync from "browser-sync";
|
||||
import spawn from "cross-spawn";
|
||||
|
@ -38,17 +37,7 @@ task("processStyles", () => {
|
|||
postcss([
|
||||
atimport(),
|
||||
tailwindcss(TAILWIND_CONFIG),
|
||||
...(!isDevelopmentBuild
|
||||
? [
|
||||
purgecss({
|
||||
content: [`${SITE_ROOT}/**/*.html`],
|
||||
defaultExtractor: (content) =>
|
||||
content.match(/[\w-/:]+(?<!:)/g) || [],
|
||||
}),
|
||||
autoprefixer(),
|
||||
cssnano(),
|
||||
]
|
||||
: []),
|
||||
...(isDevelopmentBuild ? [] : [autoprefixer(), cssnano()]),
|
||||
])
|
||||
)
|
||||
.pipe(dest(POST_BUILD_STYLESHEET));
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
"description": "A starter kit for using Tailwind with Jekyll",
|
||||
"main": "gulpfile.babel.js",
|
||||
"devDependencies": {
|
||||
"@fullhuman/postcss-purgecss": "2.1.2",
|
||||
"autoprefixer": "9.7.6",
|
||||
"babel-preset-env": "1.7.0",
|
||||
"babel-register": "6.26.0",
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
module.exports = {
|
||||
purge: [`_site/**/*.html`],
|
||||
theme: {
|
||||
extend: {}
|
||||
extend: {},
|
||||
},
|
||||
variants: {},
|
||||
plugins: []
|
||||
}
|
||||
plugins: [],
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue