diff options
-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", |