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
+11-22Lines changed: 11 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,17 @@ addressing a single deprecation at a time, and prevents backsliding
60
60
3. In your `app/app.js`, do:
61
61
62
62
```js
63
-
import './deprecation-workflow';
63
+
import { macroCondition, isDevelopingApp, importSync } from '@embroider/macros';
64
+
65
+
// Will only import your deprecation-workflow file while isDevelopingApp is true
66
+
// and will be stripped from your build if isDevelopingApp is false
67
+
//
68
+
// If you want to always include deprecation-workflow,
69
+
// use:
70
+
// import './deprecation-workflow.js';
71
+
if (macroCondition(isDevelopingApp())) {
72
+
importSync('./deprecation-workflow.js'),
73
+
}
64
74
```
65
75
66
76
4. Run your test suite\*with`ember test --server`.
@@ -108,27 +118,6 @@ nice Json like JS object with all the deprecations in your app. The
108
118
pass a string that must match the console message exactly or a `RegExp`for
109
119
`ember-cli-deprecation-workflow` filter the log by.
110
120
111
-
### Production builds
112
-
113
-
By default, production ember-cli builds already remove deprecation warnings. Any
114
-
deprecations configured to `throw` or `log` will only do so in non-production
115
-
builds.
116
-
117
-
### Enable / Disable
118
-
119
-
inclusion of`ember-cli-deprecation-workflow` is controlled by imports, so if there is an environment that you wish to disable `ember-cli-deprecation-workflow`in, that can be controlled via `@embroider/macros` conditions
120
-
121
-
```js
122
-
// app.js
123
-
import { macroCondition, isDevelopingApp, importSync } from '@embroider/macros';
124
-
125
-
// Will only import your deprecation-workflow file while isDevelopingApp is true
126
-
// and will be stripped from your build if isDevelopingApp is false
127
-
if (macroCondition(isDevelopingApp())) {
128
-
importSync('./deprecation-workflow.js'),
129
-
}
130
-
```
131
-
132
121
### Catch-all
133
122
134
123
To force all deprecations to throw (can be useful in larger teams to prevent
0 commit comments