Skip to content

Commit fddfbe1

Browse files
authored
update open props recipe (#1105)
1 parent 7efd8a5 commit fddfbe1

File tree

4 files changed

+24
-17
lines changed

4 files changed

+24
-17
lines changed

postcss-recipes/open-props/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ See : https://open-props.style/
1313
## Moving parts
1414

1515
- run PostCSS with `postcss-cli`
16-
- bundle with `postcss-import`
17-
- inject `@custom-media` with `postcss-global-data`
16+
- bundle with `@csstools/postcss-bundler`
17+
- inject `@custom-media` with `@csstools/postcss-global-data`
1818
- inject CSS variables with `postcss-jit-props`
1919
- nesting and other modern features with `postcss-preset-env`
20-
- minify with `cssnano`
20+
- minify with `@csstools/postcss-minify`
2121

2222
See `package.json` for the full list of dependencies and the scripts.
2323

24-
## Reading
24+
## Reading
2525

26-
- [cssnano](https://cssnano.co)
27-
- [open props](https://open-props.style/)
28-
- [postcss-cli](https://github.com/postcss/postcss-cli)
29-
- [postcss-global-data](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-global-data)
30-
- [postcss-import](https://www.npmjs.com/package/postcss-import)
31-
- [postcss-jit-props](https://github.com/GoogleChromeLabs/postcss-jit-props)
26+
- [`open props`](https://open-props.style/)
27+
- [`@csstools/postcss-bundler`](https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-bundler)
28+
- [`@csstools/postcss-global-data`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-global-data)
29+
- [`@csstools/postcss-minify`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-minify)
30+
- [`postcss-cli`](https://github.com/postcss/postcss-cli)
31+
- [`postcss-jit-props`](https://github.com/GoogleChromeLabs/postcss-jit-props)

postcss-recipes/open-props/dist/style.css

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

postcss-recipes/open-props/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"node": "^14 || ^16 || >=18"
99
},
1010
"devDependencies": {
11+
"@csstools/postcss-bundler": "^1.0.2",
1112
"@csstools/postcss-global-data": "^2.0.1",
12-
"cssnano": "^6.0.1",
13+
"@csstools/postcss-minify": "^1.0.0",
1314
"open-props": "^1.5.10",
1415
"postcss-cli": "^10.1.0",
1516
"postcss-custom-media": "^10.0.0",
16-
"postcss-import": "^15.1.0",
1717
"postcss-jit-props": "^1.0.13",
1818
"postcss-preset-env": "^9.1.0"
1919
},

postcss-recipes/open-props/postcss.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
const cssnano = require('cssnano');
21
const openProps = require('open-props');
2+
const postcssBundler = require('@csstools/postcss-bundler');
33
const postcssCustomMedia = require('postcss-custom-media');
44
const postcssGlobalData = require('@csstools/postcss-global-data');
5-
const postcssImport = require('postcss-import');
65
const postcssJitProps = require('postcss-jit-props');
6+
const postcssMinify = require('@csstools/postcss-minify');
77
const postcssPresetEnv = require('postcss-preset-env');
88

99
module.exports = {
1010
plugins: [
11-
postcssImport(),
11+
postcssBundler(),
1212
postcssGlobalData({
1313
files: [
1414
'node_modules://open-props/media.min.css',
@@ -24,6 +24,6 @@ module.exports = {
2424
'custom-media-queries': false,
2525
},
2626
}),
27-
cssnano(),
27+
postcssMinify(),
2828
],
2929
};

0 commit comments

Comments
 (0)