mirror of
https://github.com/LukeHagar/prettier-plugin-openapi.git
synced 2025-12-06 12:47:47 +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
|
```bash
|
||||||
npm install --save-dev prettier-plugin-openapi
|
npm install --save-dev prettier-plugin-openapi
|
||||||
# or
|
# or
|
||||||
|
pnpm add --dev prettier-plugin-openapi
|
||||||
|
# or
|
||||||
yarn add --dev prettier-plugin-openapi
|
yarn add --dev prettier-plugin-openapi
|
||||||
# or
|
# or
|
||||||
bun add --dev prettier-plugin-openapi
|
bun add --dev prettier-plugin-openapi
|
||||||
@@ -41,13 +43,13 @@ bun add --dev prettier-plugin-openapi
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Format a single file
|
# Format a single file
|
||||||
npx prettier --write api.yaml
|
pnpx prettier --write api.yaml
|
||||||
|
|
||||||
# Format all OpenAPI files in a directory
|
# 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
|
# 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
|
### Configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user