Running JS files in the public folder through Babel

There’s a bunch going on in the above example. If you’d like it explained then let us know

The summary is:

  1. L12 Find the path to the files to transpile
  2. L13 Use that path to make a Broccoli tree
  3. L15 Remove any non-js files from the tree
  4. L21 Find the ember-cli-babel addon (it is a safe assumption that this library is installed)
  5. L22 Transpile the tree with the addon
  6. 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)