Skip to content

Commit c49de0a

Browse files
Merge pull request #226 from ember-cli/docs-updates-for-4-x
Docs updates for 4.x
2 parents bec4520 + ba98f36 commit c49de0a

File tree

1 file changed

+16
-50
lines changed

1 file changed

+16
-50
lines changed

README.md

Lines changed: 16 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ addressing a single deprecation at a time, and prevents backsliding
2323

2424
### Compatibility
2525

26+
4.x
27+
28+
- Ember.js 3.28 until at least 6.10
29+
- ember-auto-import, or embroider with webpack and vite
30+
2631
3.x
2732

2833
- Ember.js 3.28 until at least 5.4
@@ -55,7 +60,17 @@ addressing a single deprecation at a time, and prevents backsliding
5560
3. In your `app/app.js`, do:
5661

5762
```js
58-
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+
}
5974
```
6075

6176
4. Run your test suite\* with `ember test --server`.
@@ -103,21 +118,6 @@ nice Json like JS object with all the deprecations in your app. The
103118
pass a string that must match the console message exactly or a `RegExp` for
104119
`ember-cli-deprecation-workflow` filter the log by.
105120

106-
### Production builds
107-
108-
By default, production ember-cli builds already remove deprecation warnings. Any
109-
deprecations configured to `throw` or `log` will only do so in non-production
110-
builds.
111-
112-
### Enable / Disable through configuration
113-
114-
If your app has disabled test files in development environment you can force enabling this addon through configuration in `ember-cli-build.js` instead:
115-
```javascript
116-
'ember-cli-deprecation-workflow': {
117-
enabled: true,
118-
},
119-
```
120-
121121
### Catch-all
122122

123123
To force all deprecations to throw (can be useful in larger teams to prevent
@@ -130,40 +130,6 @@ window.deprecationWorkflow.config = {
130130
};
131131
```
132132

133-
### Template Deprecations
134-
135-
By default, the console based deprecations that occur during template
136-
compilation are suppressed in favor of browser deprecations ran during the test
137-
suite. If you would prefer to still have the deprecations in the console, add
138-
the following to your `app/environment.js`:
139-
140-
```javascript
141-
module.exports = function (env) {
142-
var ENV = {};
143-
144-
// normal things here
145-
146-
ENV.logTemplateLintToConsole = true;
147-
};
148-
```
149-
150-
### Configuration
151-
152-
In some cases, it may be necessary to indicate a different `config` directory
153-
from the default one (`/config`). For example, you may want the flushed
154-
deprecations file to be referenced in a config directory like `my-config`.
155-
156-
Adjust the `configPath` in your `package.json` file. The `/` will automatically
157-
be prefixed.
158-
159-
```javascript
160-
{
161-
'ember-addon': {
162-
configPath: 'my-config'
163-
}
164-
}
165-
```
166-
167133
## Contributing
168134

169135
Details on contributing to the addon itself (not required for normal usage).

0 commit comments

Comments
 (0)