prettier-plugin-embed 0.3.0-rc.1 → 0.3.0

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 CHANGED
@@ -52,20 +52,6 @@ By leveraging Prettier's plugin system, this plugin overrides the default [`embe
52
52
  npm i -D prettier-plugin-embed
53
53
  ```
54
54
 
55
- Peer dependecies are automatically installed by default if you're using npm v7 or higher versions. The peer dependencies of this plugin are mainly packages to support parsing and formatting for different languages. If you only plan to use this plugin for a very specific language and don't want to bloat your node modules folder, you can omit the peer dependencies by changing the installation command to either:
56
-
57
- ```bash
58
- npm i -D --legacy-peer-deps prettier-plugin-embed
59
- ```
60
-
61
- or:
62
-
63
- ```bash
64
- npm i -D --omit=peer prettier-plugin-embed
65
- ```
66
-
67
- For other package managers, refer to their documents on how to achieve the same result.
68
-
69
55
  ## Usage
70
56
 
71
57
  ### Getting Started
@@ -169,11 +155,12 @@ Formatting embedded PHP code requires [`@prettier/plugin-php`](https://github.co
169
155
 
170
156
  #### Ruby
171
157
 
172
- | Option | Default | Description |
173
- | :-----------------------: | :---------------------------------------: | -------------------------------------------------------------------------------------------------- |
174
- | `embeddedRubyIdentifiers` | [`[...]`](./src/embedded/ruby/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as Ruby code |
158
+ | Option | Default | Description |
159
+ | :-----------------------: | :-------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------- |
160
+ | `embeddedRubyIdentifiers` | [`[...]`](./src/embedded/ruby/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as Ruby code |
161
+ | `embeddedRubyParser` | [`undefined`](./src/embedded/ruby/options.ts) | The parser used to parse the Ruby code. Available choices are `"ruby"`, `"rbs"` and `"haml"`. It will auto detect the parser if this is undefined. |
175
162
 
176
- Formatting embedded Ruby code requires [`@prettier/plugin-ruby`](https://github.com/prettier/plugin-ruby) to be loaded and [its dependencies to be installed](https://github.com/prettier/plugin-ruby#getting-started) as well. And [options](https://github.com/prettier/plugin-ruby#configuration) supported by `@prettier/plugin-php` can therefore be used to further control the formatting behavior.
163
+ Formatting embedded Ruby code requires [`@prettier/plugin-ruby`](https://github.com/prettier/plugin-ruby) to be loaded and [its dependencies to be installed](https://github.com/prettier/plugin-ruby#getting-started) as well. And [options](https://github.com/prettier/plugin-ruby#configuration) supported by `@prettier/plugin-ruby` can therefore be used to further control the formatting behavior.
177
164
 
178
165
  #### SQL
179
166
 
@@ -183,7 +170,7 @@ Formatting embedded Ruby code requires [`@prettier/plugin-ruby`](https://github.
183
170
 
184
171
  Formatting embedded SQL code requires [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql#readme) to be loaded as well. And [options](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options) supported by `prettier-plugin-sql` can therefore be used to further control the formatting behavior.
185
172
 
186
- Note that `prettier-plugin-sql` supports many different SQL dialects, and there's a one-to-one correspondence between the dialects and the identifiers. To support custom identifiers for a specific dialect, put the identifiers after that specific dialect in the identifier list in option `embeddedSqlIdentifiers`, or use [`embeddedOverrides`](#embeddedoverrides).
173
+ Note that `prettier-plugin-sql` supports many different SQL dialects and they are specified by the [`language` or `database` option](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options). To map a subset of identifiers to another dialect, please use [`embeddedOverrides`](#embeddedoverrides).
187
174
 
188
175
  #### TS
189
176
 
@@ -5,10 +5,10 @@ export declare const embeddedEmbedders: EmbeddedEmbedders;
5
5
  export declare const embeddedOptions: EmbeddedOptions;
6
6
  import * as __glob__0_0 from "./css/index.js";
7
7
  import * as __glob__0_1 from "./glsl/index.js";
8
- import * as __glob__0_2 from "./markdown/index.js";
9
- import * as __glob__0_3 from "./noop/index.js";
10
- import * as __glob__0_4 from "./es/index.js";
11
- import * as __glob__0_5 from "./html/index.js";
8
+ import * as __glob__0_2 from "./html/index.js";
9
+ import * as __glob__0_3 from "./es/index.js";
10
+ import * as __glob__0_4 from "./markdown/index.js";
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
14
  import * as __glob__0_8 from "./sql/index.js";