Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/leonardofaria/bento.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Faria <leonardofaria@gmail.com>2020-11-28 06:06:29 +0300
committerLeonardo Faria <leonardofaria@gmail.com>2020-11-28 06:06:29 +0300
commit3931385308dd45733d3c962b1e74705cb92d10eb (patch)
tree622c3aae8e12991726f76e2e8f2d8342fdf1b70e
parentb0139f2506774c5a85884bbf03ec3d5a9db2f7f9 (diff)
Disable postcss-purgecss in favor of tailwindcss purge
-rw-r--r--assets/css/dev/postcss.config.js30
-rw-r--r--assets/css/postcss.config.js30
-rw-r--r--assets/css/tailwind.config.js10
-rw-r--r--package.json4
4 files changed, 39 insertions, 35 deletions
diff --git a/assets/css/dev/postcss.config.js b/assets/css/dev/postcss.config.js
index f62884a..48e0498 100644
--- a/assets/css/dev/postcss.config.js
+++ b/assets/css/dev/postcss.config.js
@@ -8,21 +8,21 @@ module.exports = {
require('tailwindcss')(themeDir + 'assets/css/tailwind.config.js'),
// Configuration of purgecss for Tailwindcss
// see https://tailwindcss.com/docs/controlling-file-size/#setting-up-purgecss
- require('@fullhuman/postcss-purgecss')({
- // Specify the paths to all of the template files in your project
- content: [
- themeDir + 'layouts/**/*.html',
- themeDir + 'exampleSite/content/**/*.html',
- 'layouts/**/*.html',
- 'content/**/*.html',
- 'content/**/*.md',
- '**/*.md',
- ],
- // Include any special characters you're using in this regular expression
- defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
- fontFace: true,
- whitelistPatternsChildren: [/article/]
- }),
+ // require('@fullhuman/postcss-purgecss')({
+ // // Specify the paths to all of the template files in your project
+ // content: [
+ // themeDir + 'layouts/**/*.html',
+ // themeDir + 'exampleSite/content/**/*.html',
+ // 'layouts/**/*.html',
+ // 'content/**/*.html',
+ // 'content/**/*.md',
+ // '**/*.md',
+ // ],
+ // // Include any special characters you're using in this regular expression
+ // defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
+ // fontFace: true,
+ // safelist: [/article/]
+ // }),
require('autoprefixer')({
grid: true
}),
diff --git a/assets/css/postcss.config.js b/assets/css/postcss.config.js
index 47f4e11..b51ea7f 100644
--- a/assets/css/postcss.config.js
+++ b/assets/css/postcss.config.js
@@ -8,21 +8,21 @@ module.exports = {
require('tailwindcss')(themeDir + 'assets/css/tailwind.config.js'),
// Configuration of purgecss for Tailwindcss
// see https://tailwindcss.com/docs/controlling-file-size/#setting-up-purgecss
- require('@fullhuman/postcss-purgecss')({
- // Specify the paths to all of the template files in your project
- content: [
- themeDir + 'layouts/**/*.html',
- themeDir + 'exampleSite/content/**/*.html',
- 'layouts/**/*.html',
- 'content/**/*.html',
- 'content/**/*.md',
- '**/*.md',
- ],
- // Include any special characters you're using in this regular expression
- defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
- fontFace: true,
- whitelistPatternsChildren: [/article/]
- }),
+ // require('@fullhuman/postcss-purgecss')({
+ // // Specify the paths to all of the template files in your project
+ // content: [
+ // themeDir + 'layouts/**/*.html',
+ // themeDir + 'exampleSite/content/**/*.html',
+ // 'layouts/**/*.html',
+ // 'content/**/*.html',
+ // 'content/**/*.md',
+ // '**/*.md',
+ // ],
+ // // Include any special characters you're using in this regular expression
+ // defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || [],
+ // fontFace: true,
+ // safelist: [/article/]
+ // }),
require('autoprefixer')({
grid: true
}),
diff --git a/assets/css/tailwind.config.js b/assets/css/tailwind.config.js
index ac6d7f2..a2eead4 100644
--- a/assets/css/tailwind.config.js
+++ b/assets/css/tailwind.config.js
@@ -1,4 +1,11 @@
module.exports = {
+ purge: {
+ content: [
+ './layouts/**/*.html',
+ './content/**/*.md',
+ './content/**/*.html',
+ ],
+ },
theme: {
fontFamily: {
sans: [
@@ -38,7 +45,4 @@ module.exports = {
plugins: [
require('@tailwindcss/ui'),
],
- future: {
- removeDeprecatedGapUtilities: true,
- },
}
diff --git a/package.json b/package.json
index f7dfaf3..86f893a 100644
--- a/package.json
+++ b/package.json
@@ -9,8 +9,8 @@
"scripts": {
"dev": "hugo server --disableFastRender",
"dev:example": "hugo server --verbose -s exampleSite --themesDir=../.. --disableFastRender",
- "build": "hugo --gc --minify",
- "build:example": "hugo --gc --minify -s exampleSite --themesDir=../..",
+ "build": "NODE_ENV=production hugo --verbose --gc --minify",
+ "build:example": "NODE_ENV=production hugo --verbose --gc --minify -s exampleSite --themesDir=../..",
"start": "hugo --gc"
},
"devDependencies": {