prettier-plugin-embed 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/embedded/register.d.ts +5 -5
- package/dist/index.js +596 -506
- package/package.json +16 -16
package/README.md
CHANGED
|
@@ -85,6 +85,10 @@ await prettier.format(code, {
|
|
|
85
85
|
}
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
### Quick Start Config Examples
|
|
89
|
+
|
|
90
|
+
Here're some [quick start config examples](./ConfigExamples.md) to use this plugin for various embedded languages. Check beblow for a detailed explanation of all the available options.
|
|
91
|
+
|
|
88
92
|
### An Overview of the Philosophy
|
|
89
93
|
|
|
90
94
|
To use this plugin, [`embedded-language-formatting`](https://prettier.io/docs/en/options.html#embedded-language-formatting) option must be set to `auto` (which is the default setting as of now), because this option serves as the main switch for activating embedded language formatting.
|
|
@@ -240,10 +244,6 @@ An example `.json` file is:
|
|
|
240
244
|
|
|
241
245
|
Please note that not every option is supported to override. That largely depends on at which phase those options will kick in and take effect. For example, you can't override `tabWidth` in `embeddedOverrides` because this option is used in the [`printDocToString`](https://github.com/prettier/prettier/blob/7aecca5d6473d73f562ca3af874831315f8f2581/src/document/printer.js#L302) phase, where `prettier-plugin-embed` cannot override this option for only a set of specified identifiers. To find the list of unsupported options, please check the interface definition of `EmbeddedOverride` in the [source code](https://github.com/Sec-ant/prettier-plugin-embed/blob/main/src/types.ts).
|
|
242
246
|
|
|
243
|
-
## Demos
|
|
244
|
-
|
|
245
|
-
TBD.
|
|
246
|
-
|
|
247
247
|
## Contributing
|
|
248
248
|
|
|
249
249
|
Bug fixes, new language support and tests are welcome. Please have a look at the project structure before getting started. Feel free to leave questions or suggestions.
|
|
@@ -4,13 +4,13 @@ export declare const embeddedParsers: EmbeddedParsers;
|
|
|
4
4
|
export declare const embeddedEmbedders: EmbeddedEmbedders;
|
|
5
5
|
export declare const embeddedOptions: EmbeddedOptions;
|
|
6
6
|
import * as __glob__0_0 from "./css/index.js";
|
|
7
|
-
import * as __glob__0_1 from "./
|
|
8
|
-
import * as __glob__0_2 from "./
|
|
9
|
-
import * as __glob__0_3 from "./
|
|
7
|
+
import * as __glob__0_1 from "./html/index.js";
|
|
8
|
+
import * as __glob__0_2 from "./glsl/index.js";
|
|
9
|
+
import * as __glob__0_3 from "./es/index.js";
|
|
10
10
|
import * as __glob__0_4 from "./markdown/index.js";
|
|
11
11
|
import * as __glob__0_5 from "./noop/index.js";
|
|
12
12
|
import * as __glob__0_6 from "./php/index.js";
|
|
13
13
|
import * as __glob__0_7 from "./ruby/index.js";
|
|
14
|
-
import * as __glob__0_8 from "./
|
|
15
|
-
import * as __glob__0_9 from "./
|
|
14
|
+
import * as __glob__0_8 from "./sql/index.js";
|
|
15
|
+
import * as __glob__0_9 from "./ts/index.js";
|
|
16
16
|
import * as __glob__0_10 from "./xml/index.js";
|