Skip to content

Commit b99b537

Browse files
authored
perf!: make yaml dependency optional (#261)
1 parent 62d325c commit b99b537

File tree

12 files changed

+2371
-2685
lines changed

12 files changed

+2371
-2685
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ plugins:
8383
postcss-plugin: {}
8484
```
8585
86+
> [!NOTE]
87+
> For YAML configs, you must have [yaml](https://www.npmjs.com/package/yaml) installed as a peer dependency.
88+
8689
### `.postcssrc.js` or `postcss.config.js`
8790

8891
You may need some logic within your config.
@@ -100,7 +103,7 @@ In this case create JS/TS file named:
100103
- `postcss.config.mts`
101104
- `postcss.config.cts`
102105

103-
> [!NOTE]
106+
> [!NOTE]
104107
> For TypeScript configs, you must have [tsx](https://www.npmjs.com/package/tsx) or [jiti](https://www.npmjs.com/package/jiti) installed as a peer dependency.
105108

106109
```

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
}
3030
],
3131
"dependencies": {
32-
"lilconfig": "^3.1.1",
33-
"yaml": "^2.4.2"
32+
"lilconfig": "^3.1.1"
3433
},
3534
"devDependencies": {
3635
"@logux/eslint-config": "^53.0.1",
@@ -59,7 +58,8 @@
5958
"peerDependencies": {
6059
"jiti": ">=1.21.0",
6160
"postcss": ">=8.0.9",
62-
"tsx": "^4.8.1"
61+
"tsx": "^4.8.1",
62+
"yaml": "^2.4.2"
6363
},
6464
"peerDependenciesMeta": {
6565
"jiti": {
@@ -70,6 +70,9 @@
7070
},
7171
"tsx": {
7272
"optional": true
73+
},
74+
"yaml": {
75+
"optional": true
7376
}
7477
},
7578
"c8": {

0 commit comments

Comments
 (0)