purge and nanoify

This commit is contained in:
Jfriedli 2021-03-21 15:56:23 +01:00
parent 8bb860a865
commit 524e055e8c
4 changed files with 7504 additions and 2 deletions

7497
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
"version": "0.5.0",
"description": "A web version of mat2! ",
"scripts": {
"build:css": "postcss static/src/main.css -o static/dist/main.css"
"build:css": "postcss static/src/main.css -o static/dist/main.css --env=production"
},
"repository": {
"type": "git",
@ -22,6 +22,7 @@
"@fullhuman/postcss-purgecss": "^4.0.2",
"@tailwindcss/forms": "^0.2.1",
"autoprefixer": "^10.2.5",
"cssnano": "^4.1.10",
"postcss": "^8.2.8",
"postcss-cli": "^8.3.1",
"tailwindcss": "^2.0.4"

View File

@ -1,9 +1,11 @@
const path = require('path');
const cssnano = require('cssnano')
module.exports = (ctx) => ({
plugins: [
require('tailwindcss')(path.resolve(__dirname, 'tailwind.config.js')),
require('autoprefixer'),
process.env.NODE_ENV === 'production' ? cssnano({ preset: 'default' }) : null,
ctx.env === 'production' && require('@fullhuman/postcss-purgecss')({
content: [
path.resolve(__dirname, 'templates/**/*.html')

View File

@ -3,7 +3,9 @@ const defaultTheme = require('tailwindcss/defaultTheme')
module.exports = {
future: {
},
purge: [],
purge: [
"./templates/**/*.html"
],
theme: {
extend: {
colors: {