-
-
Notifications
You must be signed in to change notification settings - Fork 101
Feature flags #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feature flags #180
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,75 @@ | ||
| # Ember Resolver [](https://travis-ci.org/ember-cli/ember-resolver) | ||
|
|
||
|
|
||
| This project is tracking a new resolver based on ES6 semantics that has been extracted from (and used by) the following projects: | ||
| This project provides the Ember resolver used by the following projects: | ||
|
|
||
| * [ember-cli](https://github.com/ember-cli/ember-cli) | ||
| * [ember-app-kit](https://github.com/stefanpenner/ember-app-kit) | ||
| * [ember-appkit-rails](https://github.com/DavyJonesLocker/ember-appkit-rails) | ||
|
|
||
| ## Installation | ||
|
|
||
| Ember-resolver was previously a bower package, but since v1.0.1, it has become an ember-cli addon, and should be installed with `ember install`: | ||
| `ember-resolver` is an ember-cli addon, and should be installed with `ember install`: | ||
|
|
||
| ``` | ||
| ember install ember-resolver | ||
| ``` | ||
|
|
||
| If you're currently using ember-resolver v0.1.x in your project, you should uninstall it: | ||
| ## Feature flags | ||
|
|
||
| This resolver package supports feature flags for experimental changes. Feature | ||
| flag settings change how `ember-resolver` compiles into an ember-cli's | ||
| `vendor.js`, so you should think of them as an application build-time option. | ||
|
|
||
| Feature flags are set in an application's `config/environment.js`: | ||
|
|
||
| ```js | ||
| /* eslint-env node */ | ||
|
|
||
| module.exports = function(environment) { | ||
| var ENV = { | ||
| 'ember-resolver': { | ||
| features: { | ||
| EMBER_RESOLVER_MODULE_UNIFICATION: true | ||
| } | ||
| }, | ||
| /* ... */ | ||
| ``` | ||
|
|
||
| Note that you must restart your ember-cli server for changes to the `flags` to | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When we move to |
||
| register. | ||
|
|
||
| In the `ember-resolver` codebase, you can import these flags: | ||
|
|
||
| ```js | ||
| import { EMBER_RESOLVER_MODULE_UNIFICATION } from 'ember-resolver/features'; | ||
| ``` | ||
|
|
||
| #### Current feature flags | ||
|
|
||
| * None at this time. | ||
|
|
||
| ## Upgrading | ||
|
|
||
| `ember-resolver` is normally bumped with ember-cli releases. To install a newer | ||
| version use `yarn` or `npm`. For example: | ||
|
|
||
| ``` | ||
| yarn upgrade ember-resolver | ||
| ``` | ||
|
|
||
| #### Migrating from bower | ||
|
|
||
| Before v1.0.1 `ember-resolver` was primarially consumed bia bower. To migrate | ||
| install the addon version via `yarn` or `npm`. If you're currently using | ||
| `ember-resolver` v0.1.x in your project, you should uninstall it: | ||
|
|
||
| ``` | ||
| bower uninstall ember-resolver --save | ||
| ``` | ||
|
|
||
| _You can continue to use ember-resolver v0.1.x as a bower package, but be careful not to update it to versions greater than v1.0._ | ||
| _You can continue to use ember-resolver v0.1.x as a bower package, but be | ||
| careful not to update it to versions greater than v1.0._ | ||
|
|
||
| ## Addon Development | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| /* | ||
| * This is a stub file, it must be on disk b/c babel-plugin-debug-macros | ||
| * does not strip the module require when the transpiled variable usage is | ||
| * stripped. | ||
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we change this to use
ember-cli-build.jsinstead (no need to leak these to the browser), but we should do that in a follow up I think...