Skip to content

Commit e5ffa71

Browse files
Config option for enabling/disabling the add-on. (#88)
Co-authored-by: Gavin Joyce <[email protected]>
1 parent add5a9b commit e5ffa71

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ By default, production ember-cli builds already remove deprecation warnings. Any
8989
deprecations configured to `throw` or `log` will only do so in non-production
9090
builds.
9191

92+
### Enable / Disable through configuration
93+
94+
If your app has disabled test files in development environment you can force enabling this addon through configuration in `ember-cli-build.js` instead:
95+
```javascript
96+
'ember-cli-deprecation-workflow': {
97+
enabled: true,
98+
},
99+
```
100+
92101
### Catch-all
93102

94103
To force all deprecations to throw (can be useful in larger teams to prevent

index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ module.exports = {
1010
// * running tests against production
1111
//
1212
var app = this.app || this._findHost();
13-
return app.tests;
13+
let addonOptions = app.options['ember-cli-deprecation-workflow'];
14+
15+
if (addonOptions) {
16+
return addonOptions.enabled;
17+
} else {
18+
return app.tests;
19+
}
1420
},
1521

1622
included() {

0 commit comments

Comments
 (0)