Use Lightning CSS for minimization

This produces slightly smaller files than sass does when minimizing, is also faster at it, and doesn't make changes that could effect the behavior of the CSS
This commit is contained in:
Belle Aerni 2023-08-11 23:58:44 -07:00
parent a6591f5a70
commit 368aaa44e3
4 changed files with 414 additions and 1718 deletions

2120
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -2,9 +2,11 @@
"name": "antcms",
"description": "A simple CMS built with PHP and Markdown",
"scripts": {
"build": "npm-run-all compile-bs-css compile-tw-css",
"compile-bs-css": "sass --style compressed --load-path=node_modules --no-source-map src/Themes/Bootstrap/Assets/styles.scss src/Themes/Bootstrap/Assets/Dist/Bootstrap.min.css",
"compile-tw-css": "npx tailwindcss -i ./src/Themes/Default/Assets/tailwind.css -o ./src/Themes/Default/Assets/Dist/tailwind.css --minify"
"build": "npm-run-all compile-bs-css compile-tw-css min-bs-css min-tw-css",
"compile-bs-css": "sass --load-path=node_modules --no-source-map src/Themes/Bootstrap/Assets/styles.scss src/Themes/Bootstrap/Assets/Dist/Bootstrap.min.css",
"compile-tw-css": "npx tailwindcss -i ./src/Themes/Default/Assets/tailwind.css -o ./src/Themes/Default/Assets/Dist/tailwind.css",
"min-bs-css": "lightningcss --minify --browserslist ./src/Themes/Bootstrap/Assets/Dist/Bootstrap.min.css -o ./src/Themes/Bootstrap/Assets/Dist/Bootstrap.min.css",
"min-tw-css": "lightningcss --minify --browserslist ./src/Themes/Default/Assets/Dist/tailwind.css -o ./src/Themes/Default/Assets/Dist/tailwind.css"
},
"repository": {
"type": "git",
@ -18,6 +20,7 @@
"devDependencies": {
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.9",
"lightningcss-cli": "^1.21.5",
"npm-run-all": "^4.1.5",
"sass": "^1.63.2",
"tailwindcss": "^3.3.2"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long