Fix unpkg link (#13484)

This commit is contained in:
fisker Cheung authored and GitHub committed 2022-09-17 20:32:03 +08:00
1 parent cd3e530c2e
commit b0d9387b95
3 files changed
+8 -5

No files matched your search

+2 -2
View File
@@ -20,8 +20,8 @@ Required options:
- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource--options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files named
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.2.1/> and
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.2.1/esm/>
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.7.1/> and
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.7.1/esm/>
You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option.
+4 -1
View File
@@ -24,7 +24,10 @@ async function bump({ version }) {
// Update unpkg link in docs
processFile("docs/browser.md", (content) =>
content.replace(/(\/\/unpkg\.com\/prettier@).*?\//g, `$1${version}/`)
content.replace(
/(\/\/unpkg\.com\/(?:browse\/)?prettier@).*?\//g,
`$1${version}/`
)
);
await runYarn(["update-stable-docs"], {
@@ -21,8 +21,8 @@ Required options:
- **`plugins`**: Unlike the `format` function from the [Node.js-based API](api.md#prettierformatsource--options), this function doesn’t load plugins automatically. The `plugins` option is required because all the parsers included in the Prettier package come as plugins (for reasons of file size). These plugins are files named
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.2.1/> and
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.2.1/esm/>
- `parser-*.js` in <https://unpkg.com/browse/prettier@2.7.1/> and
- `parser-*.mjs` in <https://unpkg.com/browse/prettier@2.7.1/esm/>
You need to load the ones that you’re going to use and pass them to `prettier.format` using the `plugins` option.