Skip to content

Commit

Permalink
perf!: make yaml dependency optional (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre authored Jun 1, 2024
1 parent 62d325c commit b99b537
Show file tree
Hide file tree
Showing 12 changed files with 2,371 additions and 2,685 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ plugins:
postcss-plugin: {}
```
> [!NOTE]
> For YAML configs, you must have [yaml](https://www.npmjs.com/package/yaml) installed as a peer dependency.
### `.postcssrc.js` or `postcss.config.js`

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

> [!NOTE]
> [!NOTE]
> 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.

```
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
}
],
"dependencies": {
"lilconfig": "^3.1.1",
"yaml": "^2.4.2"
"lilconfig": "^3.1.1"
},
"devDependencies": {
"@logux/eslint-config": "^53.0.1",
Expand Down Expand Up @@ -59,7 +58,8 @@
"peerDependencies": {
"jiti": ">=1.21.0",
"postcss": ">=8.0.9",
"tsx": "^4.8.1"
"tsx": "^4.8.1",
"yaml": "^2.4.2"
},
"peerDependenciesMeta": {
"jiti": {
Expand All @@ -70,6 +70,9 @@
},
"tsx": {
"optional": true
},
"yaml": {
"optional": true
}
},
"c8": {
Expand Down
Loading

0 comments on commit b99b537

Please sign in to comment.