Release 2.7.0
This commit is contained in:
1 parent
00ee6fb6f8
commit
13dcc16330
9 files changed
+101
-34
No files matched your search
+13
-13
@@ -32,8 +32,8 @@ See below for examples.
|
||||
### Global
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/prettier@2.6.2/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.6.2/parser-graphql.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.7.0/standalone.js"></script>
|
||||
<script src="https://unpkg.com/prettier@2.7.0/parser-graphql.js"></script>
|
||||
<script>
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
@@ -48,8 +48,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import prettier from "https://unpkg.com/prettier@2.6.2/esm/standalone.mjs";
|
||||
import parserGraphql from "https://unpkg.com/prettier@2.6.2/esm/parser-graphql.mjs";
|
||||
import prettier from "https://unpkg.com/prettier@2.7.0/esm/standalone.mjs";
|
||||
import parserGraphql from "https://unpkg.com/prettier@2.7.0/esm/parser-graphql.mjs";
|
||||
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
@@ -62,8 +62,8 @@ Note that the [`unpkg` field](https://unpkg.com/#examples) in Prettier’s `pack
|
||||
|
||||
```js
|
||||
define([
|
||||
"https://unpkg.com/prettier@2.6.2/standalone.js",
|
||||
"https://unpkg.com/prettier@2.6.2/parser-graphql.js",
|
||||
"https://unpkg.com/prettier@2.7.0/standalone.js",
|
||||
"https://unpkg.com/prettier@2.7.0/parser-graphql.js",
|
||||
], (prettier, ...plugins) => {
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
@@ -88,8 +88,8 @@ This syntax doesn’t necessarily work in the browser, but it can be used when b
|
||||
### Worker
|
||||
|
||||
```js
|
||||
importScripts("https://unpkg.com/prettier@2.6.2/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@2.6.2/parser-graphql.js");
|
||||
importScripts("https://unpkg.com/prettier@2.7.0/standalone.js");
|
||||
importScripts("https://unpkg.com/prettier@2.7.0/parser-graphql.js");
|
||||
prettier.format("type Query { hello: String }", {
|
||||
parser: "graphql",
|
||||
plugins: prettierPlugins,
|
||||
@@ -102,8 +102,8 @@ If you want to format [embedded code](options.md#embedded-language-formatting),
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import prettier from "https://unpkg.com/prettier@2.6.2/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.6.2/esm/parser-babel.mjs";
|
||||
import prettier from "https://unpkg.com/prettier@2.7.0/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.7.0/esm/parser-babel.mjs";
|
||||
|
||||
console.log(
|
||||
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
|
||||
@@ -119,9 +119,9 @@ The HTML code embedded in JavaScript stays unformatted because the `html` parser
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import prettier from "https://unpkg.com/prettier@2.6.2/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.6.2/esm/parser-babel.mjs";
|
||||
import parserHtml from "https://unpkg.com/prettier@2.6.2/esm/parser-html.mjs";
|
||||
import prettier from "https://unpkg.com/prettier@2.7.0/esm/standalone.mjs";
|
||||
import parserBabel from "https://unpkg.com/prettier@2.7.0/esm/parser-babel.mjs";
|
||||
import parserHtml from "https://unpkg.com/prettier@2.7.0/esm/parser-html.mjs";
|
||||
|
||||
console.log(
|
||||
prettier.format("const html=/* HTML */ `<DIV> </DIV>`", {
|
||||
|
||||
Reference in new issue
Block a user