You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-24Lines changed: 38 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,33 +4,43 @@ This provides debug macros and feature flagging.
4
4
5
5
## Setup
6
6
7
-
The plugin takes 5 types options: `envFlags`, `features`, `debugTools`, `externalizeHelpers` and `svelte`. The `importSpecifier` is used as a hint to this plugin as to where macros are being imported and completely configurable by the host. Like Babel you can supply your own helpers using the `externalizeHelpers` options.
7
+
The plugin takes 4 types options: `flags`, `svelte`, `debugTools`, and
8
+
`externalizeHelpers`. The `importSpecifier` is used as a hint to this plugin as
9
+
to where macros are being imported and completely configurable by the host.
10
+
11
+
Like Babel you can supply your own helpers using the `externalizeHelpers`
When you externalize helpers you must provide runtime implementations for the above macros. An expansion will still occur, however we will emit references to those runtime helpers.
154
+
When you externalize helpers you must provide runtime implementations for the
155
+
above macros. An expansion will still occur, however we will emit references to
156
+
those runtime helpers.
145
157
146
158
A global expansion looks like the following:
147
159
@@ -173,26 +185,28 @@ Expands into:
173
185
174
186
# Svelte
175
187
176
-
Svelte allows for consumers to opt into stripping deprecated code from your dependecies. By adding a package name and minimum version that contains no deprecations, that code will be compiled away.
188
+
Svelte allows for consumers to opt into stripping deprecated code from your
189
+
dependecies. By adding a package name and minimum version that contains no
190
+
deprecations, that code will be compiled away.
177
191
178
-
For example, consider you are on `[email protected]` and you have no deprecations. All deprecated code in `ember-source` that is `<=2.10.0` will be removed.
192
+
For example, consider you are on `[email protected]` and you have no
193
+
deprecations. All deprecated code in `ember-source` that is `<=2.10.0` will be
194
+
removed.
179
195
180
196
```
181
-
...
197
+
182
198
svelte: {
183
199
"ember-source": "2.10.0"
184
200
}
185
-
...
201
+
186
202
```
187
203
188
-
Now if you bump to `[email protected]` you may encounter new deprecations. The workflow would then be to clear out all deprecations and then bump the version in the `svelte` options.
204
+
Now if you bump to `[email protected]` you may encounter new deprecations.
205
+
The workflow would then be to clear out all deprecations and then bump the
206
+
version in the `svelte` options.
189
207
190
208
```
191
209
svelte: {
192
210
"ember-source": "2.11.0"
193
211
}
194
212
```
195
-
196
-
# Hygenic
197
-
198
-
As you may notice that we inject `DEBUG` into the code when we expand the macro. We guarantee that the binding is unique when injected and follow the local binding name if it is imported directly.
0 commit comments