Skip to content

Commit fac9ce0

Browse files
committed
mention npx in install docs
1 parent f0780f5 commit fac9ce0

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

docs/install.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@ npm install --global prettier
2020
```
2121

2222
> We recommend pinning an exact version of prettier in your `package.json` as we introduce stylistic changes in patch releases.
23+
24+
If you use `npx` to run Prettier, the version should be pinned like this:
25+
26+
```bash
27+
npx prettier@2.0.1 . --write
28+
```

scripts/release/steps/update-version.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ async function bump({ version }) {
1515
processFile(".github/ISSUE_TEMPLATE/integration.md", (content) =>
1616
content.replace(/^(- Prettier Version: ).*?$/m, `$1${version}`)
1717
);
18+
processFile("docs/install.md", (content) =>
19+
content.replace(/^(npx prettier@)\S+/m, `$1${version}`)
20+
);
1821

1922
// Update unpkg link in docs
2023
processFile("docs/browser.md", (content) =>

0 commit comments

Comments
 (0)