rwjblue / ember-cli-esnext

35 stars 7 forks source link

Include regenerator runtime in addon tree #13

Closed marcioj closed 9 years ago

marcioj commented 9 years ago

This PR adds the regenerator runtime in the addon tree. I tried to use app.import but not get success due to some errors with glob and absolute paths, so I used the treeFor hook. At the moment the regenerator is always included, I think it's ok, because the runtime is small and all will works. I created this repo if someone wants to test these changes, the users/index route is where the async await is used.

Fixes #3

rwjblue commented 9 years ago

Looks good, can you make a test repo and throw up a gist of the compiled vendor.js and app-name.js so I can see what the output looks like?

marcioj commented 9 years ago

I created a repo called esnext-test, pointing to this branch. There is a simple index route using async/await. This is the gist with the output using wrapInEval: false https://gist.github.com/marcioj/6550874f13d8c5f10757. The regenerator runtime is included once in the vendor.js.

andrusieczko commented 9 years ago

Great! Works for me, thanks! :+1: