Skip to content

Commit

Permalink
mention npx in install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 committed Mar 23, 2020
1 parent f0780f5 commit fac9ce0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/install.md
Expand Up @@ -20,3 +20,9 @@ npm install --global prettier
```

> We recommend pinning an exact version of prettier in your `package.json` as we introduce stylistic changes in patch releases.
If you use `npx` to run Prettier, the version should be pinned like this:

```bash
npx prettier@2.0.1 . --write
```
3 changes: 3 additions & 0 deletions scripts/release/steps/update-version.js
Expand Up @@ -15,6 +15,9 @@ async function bump({ version }) {
processFile(".github/ISSUE_TEMPLATE/integration.md", (content) =>
content.replace(/^(- Prettier Version: ).*?$/m, `$1${version}`)
);
processFile("docs/install.md", (content) =>
content.replace(/^(npx prettier@)\S+/m, `$1${version}`)
);

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

0 comments on commit fac9ce0

Please sign in to comment.