Move to Lightning CSS

This commit is contained in:
Nikita Karamov 2023-08-26 15:37:02 +02:00
parent dc2b3bd805
commit 16e30c45a2
No known key found for this signature in database
GPG key ID: 41D6F71EE78E77CD
3 changed files with 120 additions and 59 deletions

View file

@ -1,4 +1,5 @@
import { defineConfig } from "astro/config"; import { defineConfig } from "astro/config";
import lightningcss from "vite-plugin-lightningcss";
import cloudflare from "@astrojs/cloudflare"; import cloudflare from "@astrojs/cloudflare";
import deno from "@astrojs/deno"; import deno from "@astrojs/deno";
@ -51,4 +52,7 @@ if (process.env.VERCEL) {
export default defineConfig({ export default defineConfig({
site: "https://s2f.kytta.dev", site: "https://s2f.kytta.dev",
...configMixin, ...configMixin,
vite: {
plugins: [lightningcss()],
},
}); });

View file

@ -34,14 +34,10 @@
"@types/node": "^18.17.11", "@types/node": "^18.17.11",
"@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/eslint-plugin": "^6.4.1",
"@typescript-eslint/parser": "^6.4.1", "@typescript-eslint/parser": "^6.4.1",
"autoprefixer": "^10.4.15",
"browserslist": "^4.21.10",
"eslint": "^8.48.0", "eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0", "eslint-config-prettier": "^9.0.0",
"eslint-plugin-astro": "^0.29.0", "eslint-plugin-astro": "^0.29.0",
"eslint-plugin-unicorn": "^48.0.1", "eslint-plugin-unicorn": "^48.0.1",
"postcss": "^8.4.28",
"postcss-csso": "^6.0.1",
"prettier": "^3.0.2", "prettier": "^3.0.2",
"prettier-plugin-astro": "^0.12.0", "prettier-plugin-astro": "^0.12.0",
"sass": "^1.66.1", "sass": "^1.66.1",
@ -49,14 +45,8 @@
"stylelint": "^15.10.3", "stylelint": "^15.10.3",
"stylelint-config-standard-scss": "^10.0.0", "stylelint-config-standard-scss": "^10.0.0",
"svgo": "^3.0.2", "svgo": "^3.0.2",
"typescript": "^5.0.2" "typescript": "^5.0.2",
}, "vite-plugin-lightningcss": "^0.0.5"
"postcss": {
"map": true,
"plugins": {
"autoprefixer": {},
"postcss-csso": {}
}
}, },
"prettier": { "prettier": {
"printWidth": 80, "printWidth": 80,

View file

@ -40,12 +40,6 @@ devDependencies:
'@typescript-eslint/parser': '@typescript-eslint/parser':
specifier: ^6.4.1 specifier: ^6.4.1
version: 6.4.1(eslint@8.48.0)(typescript@5.0.2) version: 6.4.1(eslint@8.48.0)(typescript@5.0.2)
autoprefixer:
specifier: ^10.4.15
version: 10.4.15(postcss@8.4.28)
browserslist:
specifier: ^4.21.10
version: 4.21.10
eslint: eslint:
specifier: ^8.48.0 specifier: ^8.48.0
version: 8.48.0 version: 8.48.0
@ -58,12 +52,6 @@ devDependencies:
eslint-plugin-unicorn: eslint-plugin-unicorn:
specifier: ^48.0.1 specifier: ^48.0.1
version: 48.0.1(eslint@8.48.0) version: 48.0.1(eslint@8.48.0)
postcss:
specifier: ^8.4.28
version: 8.4.28
postcss-csso:
specifier: ^6.0.1
version: 6.0.1(postcss@8.4.28)
prettier: prettier:
specifier: ^3.0.2 specifier: ^3.0.2
version: 3.0.2 version: 3.0.2
@ -88,6 +76,9 @@ devDependencies:
typescript: typescript:
specifier: ^5.0.2 specifier: ^5.0.2
version: 5.0.2 version: 5.0.2
vite-plugin-lightningcss:
specifier: ^0.0.5
version: 0.0.5
packages: packages:
@ -1665,22 +1656,6 @@ packages:
resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==} resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==}
dev: false dev: false
/autoprefixer@10.4.15(postcss@8.4.28):
resolution: {integrity: sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==}
engines: {node: ^10 || ^12 || >=14}
hasBin: true
peerDependencies:
postcss: ^8.1.0
dependencies:
browserslist: 4.21.10
caniuse-lite: 1.0.30001523
fraction.js: 4.2.1
normalize-range: 0.1.2
picocolors: 1.0.0
postcss: 8.4.28
postcss-value-parser: 4.2.0
dev: true
/b4a@1.6.4: /b4a@1.6.4:
resolution: {integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==} resolution: {integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==}
@ -2125,6 +2100,12 @@ packages:
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
dev: false dev: false
/detect-libc@1.0.3:
resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==}
engines: {node: '>=0.10'}
hasBin: true
dev: true
/detect-libc@2.0.2: /detect-libc@2.0.2:
resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==}
engines: {node: '>=8'} engines: {node: '>=8'}
@ -2812,10 +2793,6 @@ packages:
resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==}
dev: true dev: true
/fraction.js@4.2.1:
resolution: {integrity: sha512-/KxoyCnPM0GwYI4NN0Iag38Tqt+od3/mLuguepLgCAKPn0ZhC544nssAW0tG2/00zXEYl9W+7hwAIpLHo6Oc7Q==}
dev: true
/fresh@0.5.2: /fresh@0.5.2:
resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==}
engines: {node: '>= 0.6'} engines: {node: '>= 0.6'}
@ -3396,6 +3373,104 @@ packages:
type-check: 0.4.0 type-check: 0.4.0
dev: true dev: true
/lightningcss-darwin-arm64@1.21.7:
resolution: {integrity: sha512-tt7hIsFio9jZofTVHtCACz6rB6c9RyABMXfA9A/VcKOjS3sq+koX/QkRJWY06utwOImbJIXBC5hbg9t3RkPUAQ==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/lightningcss-darwin-x64@1.21.7:
resolution: {integrity: sha512-F4gS4bf7eWekfPT+TxJNm/pF+QRgZiTrTkQH6cw4/UWfdeZISfuhD5El2dm16giFnY0K5ylIwO+ZusgYNkGSXA==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/lightningcss-freebsd-x64@1.21.7:
resolution: {integrity: sha512-RMfNzJWXCSfPnL55fcLWEAadcY6QUFT0S8NceNKYzp1KiCZtkJIy6RQ5SaVxPzRqd3iMsahUf5sfnG8N1UQSNQ==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [freebsd]
requiresBuild: true
dev: true
optional: true
/lightningcss-linux-arm-gnueabihf@1.21.7:
resolution: {integrity: sha512-biSRUDZNx7vubWP1jArw/qqfZKPGpkV/qzunasZzxmqijbZ43sW9faDQYxWNcxPWljJJdF/qs6qcurYFovWtrQ==}
engines: {node: '>= 12.0.0'}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
/lightningcss-linux-arm64-gnu@1.21.7:
resolution: {integrity: sha512-PENY8QekqL9TG3AY/A7rkUBb5ymefGxea7Oe7+x7Hbw4Bz4Hpj5cec5OoMypMqFbURPmpi0fTWx4vSWUPzpDcA==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/lightningcss-linux-arm64-musl@1.21.7:
resolution: {integrity: sha512-pfOipKvA/0X1OjRaZt3870vnV9UGBSjayIqHh0fGx/+aRz3O0MVFHE/60P2UWXpM3YGJEw/hMWtNkrFwqOge8A==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/lightningcss-linux-x64-gnu@1.21.7:
resolution: {integrity: sha512-dgcsis4TAA7s0ia4f31QHX+G4PWPwxk+wJaEQLaV0NdJs09O5hHoA8DpLEr8nrvc/tsRTyVNBP1rDtgzySjpXg==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/lightningcss-linux-x64-musl@1.21.7:
resolution: {integrity: sha512-A+9dXpxld3p4Cd6fxev2eqEvaauYtrgNpXV3t7ioCJy30Oj9nYiNGwiGusM+4MJVcEpUPGUGiuAqY4sWilRDwA==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/lightningcss-win32-x64-msvc@1.21.7:
resolution: {integrity: sha512-07/8vogEq+C/mF99pdMhh/f19/xreq8N9Ca6AWeVHZIdODyF/pt6KdKSCWDZWIn+3CUxI8gCJWuUWyOc3xymvw==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/lightningcss@1.21.7:
resolution: {integrity: sha512-xITZyh5sLFwRPYUSw15T00Rm7gcQ1qOPuQwNOcvHsTm6nLWTQ723w7zl42wrC5t+xtdg6FPmnXHml1nZxxvp1w==}
engines: {node: '>= 12.0.0'}
dependencies:
detect-libc: 1.0.3
optionalDependencies:
lightningcss-darwin-arm64: 1.21.7
lightningcss-darwin-x64: 1.21.7
lightningcss-freebsd-x64: 1.21.7
lightningcss-linux-arm-gnueabihf: 1.21.7
lightningcss-linux-arm64-gnu: 1.21.7
lightningcss-linux-arm64-musl: 1.21.7
lightningcss-linux-x64-gnu: 1.21.7
lightningcss-linux-x64-musl: 1.21.7
lightningcss-win32-x64-msvc: 1.21.7
dev: true
/lines-and-columns@1.2.4: /lines-and-columns@1.2.4:
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
dev: true dev: true
@ -4100,11 +4175,6 @@ packages:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
/normalize-range@0.1.2:
resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==}
engines: {node: '>=0.10.0'}
dev: true
/npm-run-path@5.1.0: /npm-run-path@5.1.0:
resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@ -4310,16 +4380,6 @@ packages:
engines: {node: '>=4'} engines: {node: '>=4'}
dev: true dev: true
/postcss-csso@6.0.1(postcss@8.4.28):
resolution: {integrity: sha512-ZV4yEziMrx6CEiqabGLrDva0pMD7Fbw7yP+LzJvaynM4OJgTssGN6dHiMsJMJdpmNaLJltXVLsrb/5sxbFa8sA==}
engines: {node: ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'}
peerDependencies:
postcss: ^8.0.0
dependencies:
csso: 5.0.5
postcss: 8.4.28
dev: true
/postcss-media-query-parser@0.2.3: /postcss-media-query-parser@0.2.3:
resolution: {integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==} resolution: {integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==}
dev: true dev: true
@ -5506,6 +5566,13 @@ packages:
vfile-message: 3.1.4 vfile-message: 3.1.4
dev: false dev: false
/vite-plugin-lightningcss@0.0.5:
resolution: {integrity: sha512-lhz5GkXeRT/k09A7qEqmoL3CwdJDHgODPeGVlWGU1UxuGPEKfvSpKnDXza8nawKvxvc0eawJEsKjBzQP4AeGHw==}
dependencies:
browserslist: 4.21.10
lightningcss: 1.21.7
dev: true
/vite@4.4.9(@types/node@18.17.11)(sass@1.66.1): /vite@4.4.9(@types/node@18.17.11)(sass@1.66.1):
resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==}
engines: {node: ^14.18.0 || >=16.0.0} engines: {node: ^14.18.0 || >=16.0.0}