There’s a bunch going on in the above example. If you’d like it explained then let us know
The summary is:
-
L12
Find the path to the files to transpile -
L13
Use that path to make a Broccoli tree -
L15
Remove any non-js files from the tree -
L21
Find theember-cli-babel
addon (it is a safe assumption that this library is installed) -
L22
Transpile the tree with the addon -
L45
Merge the result with the reset of the application
Note that this example is in an addon but it should be possible to do this in ember-cli-build.js
. You’ll want to not return app.toTree()
right away, but merge the transpiled files in with this (step 6 above)