Fix unpkg URL
parent
a227df916a
commit
7b723d345d
|
@ -17,8 +17,8 @@ See [Usage](#usage) below for examples.
|
|||
|
||||
<!-- prettier-ignore -->
|
||||
```html
|
||||
<script src="https://unpkg.me/prettier@1.13.0/standalone.js"></script>
|
||||
<script src="https://unpkg.me/prettier@1.13.0/parser-graphql.js"></script>
|
||||
<script src="https://unpkg.com/prettier@1.13.0/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@1.13.0/parser-graphql.js"></script>
|
||||
<script type="text/javascript">
|
||||
prettier.format("query { }", { parser: "graphql", plugins: prettierPlugins });
|
||||
</script>
|
||||
|
@ -28,8 +28,8 @@ prettier.format("query { }", { parser: "graphql", plugins: prettierPlugins });
|
|||
|
||||
```js
|
||||
define([
|
||||
"https://unpkg.me/prettier@1.13.0/standalone.js",
|
||||
"https://unpkg.me/prettier@1.13.0/parser-graphql.js"
|
||||
"https://unpkg.com/prettier@1.13.0/standalone.js",
|
||||
"https://unpkg.com/prettier@1.13.0/parser-graphql.js"
|
||||
], (prettier, ...plugins) => {
|
||||
prettier.format("query { }", { parser: "graphql", plugins });
|
||||
});
|
||||
|
@ -48,7 +48,7 @@ This syntax doesn't necessarily work in the browser, but it can be used when bun
|
|||
### Worker
|
||||
|
||||
```js
|
||||
importScripts("https://unpkg.me/prettier@1.13.0/standalone.js");
|
||||
importScripts("https://unpkg.me/prettier@1.13.0/parser-graphql.js");
|
||||
importScripts("https://unpkg.com/prettier@1.13.0/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@1.13.0/parser-graphql.js");
|
||||
prettier.format("query { }", { parser: "graphql", plugins: prettierPlugins });
|
||||
```
|
||||
|
|
|
@ -18,9 +18,9 @@ This has been long wanted by the team and our users and we're finally announcing
|
|||
|
||||
<!-- prettier-ignore -->
|
||||
```html
|
||||
<script src="https://unpkg.me/prettier@1.13.0/standalone.js"></script>
|
||||
<script src="https://unpkg.me/prettier@1.13.0/parser-babylon.js"></script>
|
||||
<script src="https://unpkg.me/prettier@1.13.0/parser-graphql.js"></script>
|
||||
<script src="https://unpkg.com/prettier@1.13.0/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@1.13.0/parser-babylon.js"></script>
|
||||
<script src="https://unpkg.com/prettier@1.13.0/parser-graphql.js"></script>
|
||||
<script type="text/javascript">
|
||||
var formatButton = document.querySelector("#format");
|
||||
var textInput = document.querySelector("#input");
|
||||
|
@ -33,7 +33,7 @@ formatButton.addEventListener("click", function() {
|
|||
});</script>
|
||||
```
|
||||
|
||||
Read more about it in the [docs](https://prettier.io/docs/en/browser.html).
|
||||
Read more about it in the [docs](https://prettier.io/docs/en/browser.html) or try it on this [JS Bin](https://jsbin.com/vabiyomoso/edit?html,output).
|
||||
|
||||
#### Don't default to the JavaScript parser ([#4528] by [@duailibe])
|
||||
|
||||
|
|
Loading…
Reference in New Issue