diff options
author | Leonardo Faria <leonardofaria@users.noreply.github.com> | 2020-11-28 06:25:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-28 06:25:09 +0300 |
commit | 8075a7db53ceadd32ebb6a6fdc3129112eb68a90 (patch) | |
tree | 3f931fd94c2070c3443a433b14c7983a5e97b7ea | |
parent | b0139f2506774c5a85884bbf03ec3d5a9db2f7f9 (diff) | |
parent | 137578dd12d3eb535a69d9866b76402031172954 (diff) |
Merge pull request #42 from leonardofaria/remove-purge-plugin
-rw-r--r-- | assets/css/dev/postcss.config.js | 25 | ||||
-rw-r--r-- | assets/css/postcss.config.js | 25 | ||||
-rw-r--r-- | assets/css/tailwind.config.js | 15 | ||||
-rw-r--r-- | package.json | 5 |
4 files changed, 18 insertions, 52 deletions
diff --git a/assets/css/dev/postcss.config.js b/assets/css/dev/postcss.config.js index f62884a..a2e5ef8 100644 --- a/assets/css/dev/postcss.config.js +++ b/assets/css/dev/postcss.config.js @@ -2,29 +2,8 @@ const themeDir = __dirname + '/../../../'; module.exports = { plugins: [ - require('postcss-import')({ - path: [themeDir] - }), + require('postcss-import')({ path: [themeDir] }), 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('autoprefixer')({ - grid: true - }), + require('autoprefixer')(), ] } diff --git a/assets/css/postcss.config.js b/assets/css/postcss.config.js index 47f4e11..400c58d 100644 --- a/assets/css/postcss.config.js +++ b/assets/css/postcss.config.js @@ -2,29 +2,8 @@ const themeDir = __dirname + '/../../'; module.exports = { plugins: [ - require('postcss-import')({ - path: [themeDir] - }), + require('postcss-import')({ path: [themeDir] }), 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('autoprefixer')({ - grid: true - }), + require('autoprefixer')(), ] } diff --git a/assets/css/tailwind.config.js b/assets/css/tailwind.config.js index ac6d7f2..0ad9a63 100644 --- a/assets/css/tailwind.config.js +++ b/assets/css/tailwind.config.js @@ -1,4 +1,16 @@ +const themeDir = __dirname + '/../../'; + module.exports = { + purge: { + content: [ + './layouts/**/*.html', + './content/**/*.md', + './content/**/*.html', + themeDir + 'layouts/**/*.html', + themeDir + 'exampleSite/content/**/*.html', + themeDir + 'exampleSite/content/**/*.md', + ], + }, theme: { fontFamily: { sans: [ @@ -38,7 +50,4 @@ module.exports = { plugins: [ require('@tailwindcss/ui'), ], - future: { - removeDeprecatedGapUtilities: true, - }, } diff --git a/package.json b/package.json index f7dfaf3..f56ff54 100644 --- a/package.json +++ b/package.json @@ -9,12 +9,11 @@ "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": { - "@fullhuman/postcss-purgecss": "^3.0.0", "@tailwindcss/ui": "^0.7.2", "autoprefixer": "^10.0.3", "postcss": "^8.1.10", |