Skip to content

Commit

Permalink
build(@vtmn/svelte): switch to postcss
Browse files Browse the repository at this point in the history
  • Loading branch information
Tlahey committed Jul 26, 2022
1 parent 4a35698 commit 35efc70
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
16 changes: 8 additions & 8 deletions packages/sources/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
"test": "jest src",
"test:watch": "npm run test -- --watch"
},
"dependencies": {
"devDependencies": {
"@rollup/plugin-node-resolve": "^13.1.2",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/svelte": "^3.0.3",
"@vtmn/css-accordion": "^0.5.0",
"@vtmn/css-alert": "^0.8.2",
"@vtmn/css-badge": "^0.13.0",
Expand Down Expand Up @@ -64,20 +67,17 @@
"@vtmn/css-toast": "^0.7.2",
"@vtmn/css-toggle": "^0.8.2",
"@vtmn/css-tooltip": "^0.8.2",
"@vtmn/icons": "^0.14.0"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^13.1.2",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/svelte": "^3.0.3",
"@vtmn/icons": "^0.14.0",
"babel-jest": "^28.1.0",
"chokidar-cli": "^3.0.0",
"eslint": "8.18.0",
"eslint-plugin-svelte3": "4.0.0",
"jest": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"postcss": "^8.4.14",
"postcss-import": "^14.1.0",
"rollup": "^2.73.0",
"rollup-plugin-css-only": "^3.1.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-svelte": "^7.1.0",
"svelte": "3.49.0",
"svelte-jester": "^2.3.2",
Expand Down
8 changes: 6 additions & 2 deletions packages/sources/svelte/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import resolve from '@rollup/plugin-node-resolve';
import css from 'rollup-plugin-css-only';
import svelte from 'rollup-plugin-svelte';
import sveltePreprocess from 'svelte-preprocess';
import postcss from 'rollup-plugin-postcss';
import postcssImport from 'postcss-import';
const preprocessOptions = require('./svelte.config').preprocessOptions;

const src = {
Expand Down Expand Up @@ -91,7 +92,10 @@ const svelteOptions = (component) => ({
svelte({
preprocess: sveltePreprocess(preprocessOptions),
}),
css({ output: `${component}.css` }),
postcss({
extract: `${component}.css`,
plugins: [postcssImport()],
}),
resolve(),
],
});
Expand Down
25 changes: 9 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3304,14 +3304,6 @@
make-dir "^3.1.0"
mime "^2.4.6"

"@rollup/pluginutils@4", "@rollup/pluginutils@^4.1.2", "@rollup/pluginutils@^4.2.1":
version "4.2.1"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d"
integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==
dependencies:
estree-walker "^2.0.1"
picomatch "^2.2.2"

"@rollup/pluginutils@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
Expand All @@ -3321,6 +3313,14 @@
estree-walker "^1.0.1"
picomatch "^2.2.2"

"@rollup/pluginutils@^4.1.2", "@rollup/pluginutils@^4.2.1":
version "4.2.1"
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d"
integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==
dependencies:
estree-walker "^2.0.1"
picomatch "^2.2.2"

"@rushstack/eslint-patch@^1.1.0":
version "1.1.4"
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.1.4.tgz#0c8b74c50f29ee44f423f7416829c0bf8bb5eb27"
Expand Down Expand Up @@ -20159,19 +20159,12 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^3.0.0"
inherits "^2.0.1"

rollup-plugin-css-only@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-css-only/-/rollup-plugin-css-only-3.1.0.tgz#6a701cc5b051c6b3f0961e69b108a9a118e1b1df"
integrity sha512-TYMOE5uoD76vpj+RTkQLzC9cQtbnJNktHPB507FzRWBVaofg7KhIqq1kGbcVOadARSozWF883Ho9KpSPKH8gqA==
dependencies:
"@rollup/pluginutils" "4"

rollup-plugin-peer-deps-external@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.4.tgz#8a420bbfd6dccc30aeb68c9bf57011f2f109570d"
integrity sha512-AWdukIM1+k5JDdAqV/Cxd+nejvno2FVLVeZ74NKggm3Q5s9cbbcOgUPGdbxPi4BXu7xGaZ8HG12F+thImYu/0g==

rollup-plugin-postcss@^4.0.0:
rollup-plugin-postcss@^4.0.0, rollup-plugin-postcss@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/rollup-plugin-postcss/-/rollup-plugin-postcss-4.0.2.tgz#15e9462f39475059b368ce0e49c800fa4b1f7050"
integrity sha512-05EaY6zvZdmvPUDi3uCcAQoESDcYnv8ogJJQRp6V5kZ6J6P7uAVJlrTZcaaA20wTH527YTnKfkAoPxWI/jPp4w==
Expand Down

0 comments on commit 35efc70

Please sign in to comment.