diff --git a/source/contributing/adding-new-features.md b/source/contributing/adding-new-features.md index 3984781fc..c329051df 100644 --- a/source/contributing/adding-new-features.md +++ b/source/contributing/adding-new-features.md @@ -44,7 +44,7 @@ problems with early return. ```js if (Ember.FEATURES.isEnabled("feature")) { // implementation -} +} ``` Tests will always run with all features on, so make sure that any tests @@ -64,7 +64,7 @@ described above. #### Feature Naming Conventions -```js +```config/environment.js Ember.FEATURES["-"] // if package specific Ember.FEATURES["container-factory-injections"] Ember.FEATURES["htmlbars"] @@ -77,8 +77,16 @@ guarded by the conditionals in the original source. This means that users of the canary build can enable whatever features they want by enabling them before creating their Ember.Application. -```js -Ember.FEATURES["htmlbars"] = true; +```config/environment.js +module.exports = function(environment) { + var ENV = { + EmberENV: { + FEATURES: { + htmlbars: true + } + }, + } +} ``` ### `features.json`