mirror of
https://github.com/LukeHagar/prettier-plugin-openapi.git
synced 2025-12-06 04:21:03 +00:00
Update README.md to include pnpm and pnpx commands for installing and formatting with prettier-plugin-openapi
This commit is contained in:
@@ -30,6 +30,8 @@ A Prettier plugin for formatting OpenAPI/Swagger JSON and YAML files with intell
|
||||
```bash
|
||||
npm install --save-dev prettier-plugin-openapi
|
||||
# or
|
||||
pnpm add --dev prettier-plugin-openapi
|
||||
# or
|
||||
yarn add --dev prettier-plugin-openapi
|
||||
# or
|
||||
bun add --dev prettier-plugin-openapi
|
||||
@@ -41,13 +43,13 @@ bun add --dev prettier-plugin-openapi
|
||||
|
||||
```bash
|
||||
# Format a single file
|
||||
npx prettier --write api.yaml
|
||||
pnpx prettier --write api.yaml
|
||||
|
||||
# Format all OpenAPI files in a directory
|
||||
npx prettier --write "**/*.{openapi.json,openapi.yaml,swagger.json,swagger.yaml}"
|
||||
pnpx prettier --write "**/*.{openapi.json,openapi.yaml,swagger.json,swagger.yaml}"
|
||||
|
||||
# Format with specific options
|
||||
npx prettier --write api.yaml --tab-width 4 --print-width 100
|
||||
pnpx prettier --write api.yaml --tab-width 4 --print-width 100
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
Reference in New Issue
Block a user