-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose
getSupportedExtensions
method.
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -23,6 +23,7 @@ allow you to use latest Javascript in your Ember CLI project. | |
+ [Adding Custom Plugins](#adding-custom-plugins) | ||
+ [Additional Trees](#additional-trees) | ||
+ [`buildBabelOptions` usage](#buildbabeloptions-usage) | ||
+ [`getSupportedExtensions` usage](#getsupportedextensions-usage) | ||
+ [`transpileTree` usage](#transpiletree-usage) | ||
* [Debug Tooling](#debug-tooling) | ||
+ [Debug Macros](#debug-macros) | ||
|
@@ -412,6 +413,16 @@ let options = babelAddon.buildBabelOptions(config) | |
require('babel-core').transform('something', options); | ||
``` | ||
|
||
#### `getSupportedExtensions` usage | ||
|
||
```js | ||
// find your babel addon (can use `this.findAddonByName('ember-cli-babel')` in [email protected] and newer) | ||
let babelAddon = this.addons.find(addon => addon.name === 'ember-cli-babel'); | ||
|
||
// create the babel options to use elsewhere based on the config above | ||
let extensions = babelAddon.getSupportedExtensions(config) | ||
``` | ||
|
||
#### `transpileTree` usage | ||
|
||
```js | ||
|
This file contains 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