-
Notifications
You must be signed in to change notification settings - Fork 27
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
EmberCLI and ES6 Support #44
Comments
Yeah that's why there is #42 |
honestly doing:
would break bindings in cycle situations anyways, so i would discourage the re-aliasing, once full es6 syntax is supported + ember finally finishes that migration we will have.
no need to re-alias, and cycle safe bindings are preserved. |
👍 |
So, is this safe to use with ember-cli 0.40 or will it break? |
I think we should motivate/encourage @ghempton to make a new release that fixes this and other blocking issues. Until such fixes are made, I don't think it will work for the latest ember/cli releases. |
Fixed and tested here ;) With room for improvements... |
What's the status on this one? Should we use @kristianmandrup's PR? Or is there another way to fix this? |
If I try to use ember script with EmberCLI (which uses ES6 style import modules) it doesn't work anymore (e.g. with EmberCLI 0.37).
This problem is always reproducible when using ES6 because of the lack of global namespaces. Now Ember is not globally available so I have to import it (
import Ember from "ember"
).The problem is that the substitution of
import Ember from "ember"
is after the generated getters and setters generated lines, so I always get theTypeError: undefined Ember
in any project using both EmberScript and ES6.I think that the problem is more generic because somehow the EmberScript compiler is twisting the rows (which is generally bad).
As a programmer if I write
I expect that the import thing happens before the class definition thing.
Instead, this is what has been generated:
As you can see the fourth line should happen before to the first three lines, in order to have the same semantics has the EmberScript defined code.
The text was updated successfully, but these errors were encountered: