Skip to content
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

Update to es6 module syntax #855

Closed
MajorBreakfast opened this issue Sep 2, 2014 · 7 comments · Fixed by #998
Closed

Update to es6 module syntax #855

MajorBreakfast opened this issue Sep 2, 2014 · 7 comments · Fixed by #998
Labels

Comments

@MajorBreakfast
Copy link
Contributor

module myModule from 'my-module' became import * as myModule from 'my-module'
http://jsmodules.io/

I think many of you are already aware of that. I'm just posting it as an issue because it needs to be addressed.

MajorBreakfast added a commit to MajorBreakfast/handlebars.js-1 that referenced this issue Sep 2, 2014
This will enable compatibilty with jspm as soon as handlebars-lang#855 has been addressed.
@kpdecker
Copy link
Collaborator

kpdecker commented Sep 4, 2014

@wycats @ebryn how are ember and htmlbars using the es6 components? I don't really want to play spec whackamole, particularly with the touchy toolchain that we have and not being 100% sure how existing projects are touching Handlebars es6 files.

@kpdecker kpdecker added the bug label Sep 4, 2014
@kpdecker kpdecker added this to the Next milestone Sep 4, 2014
@wycats
Copy link
Collaborator

wycats commented Sep 4, 2014

@mmun tag, you're it.

@mmun
Copy link
Contributor

mmun commented Sep 4, 2014

@kpdecker I get your concern of spec whackamole. That said I think it's important for a popular project like handlebars to be compatible with https://github.com/esnext/es6-module-transpiler. There's some code that's violating some, I think at this point, well established parts of the spec. I haven't audited the whole code base yet, but for example redefining the import here:

https://github.com/wycats/handlebars.js/blob/master/lib/handlebars.js#L2
https://github.com/wycats/handlebars.js/blob/master/lib/handlebars.js#L30

That said, it's not blocking HTMLBars right now and there are probably more pressing issues.

@MajorBreakfast
Copy link
Contributor Author

Traceur also supports outputting to AMD. They're also very good at keeping pace with the spec as it evolves. I'm using it since about four months now and as far as I can tell, Google does an excellent job maintaining it. If you chose to, you can even disable other transforms it provides.

@stefanpenner
Copy link
Collaborator

@MajorBreakfast it has also fixed alot of its crazy output

@kpdecker
Copy link
Collaborator

kpdecker commented Nov 2, 2014

It looks like es6-module-transpiler has implementing massively breaking changes that requires us to redo our build stack. When I tested their latest CLI implementation against the handlebars lib, it output code that was missing dependencies and also utilized getters meaning IE versions prior to 9 would have to be desupported, which is not going to happen just yet.

If someone can help update the build chain to support this feature and not drop our various build targets (CJS, AMD, UMD), I'm fine with changing to the new syntax, but right now it seems like everything is far to unstable to make it worthwhile.

MajorBreakfast added a commit to MajorBreakfast/handlebars.js-1 that referenced this issue Nov 10, 2014
This will enable compatibilty with jspm as soon as handlebars-lang#855 has been addressed.
kpdecker added a commit that referenced this issue Apr 16, 2015
Converts the tool chain to use babel, eslint, and webpack vs. the previous proprietary solutions.

Additionally begins enforcing additional linting concerns as well as updates the code to reflect these rules.

Fixes #855
Fixes #933
kpdecker added a commit that referenced this issue Apr 16, 2015
Converts the tool chain to use babel, eslint, and webpack vs. the previous proprietary solutions.

Additionally begins enforcing additional linting concerns as well as updates the code to reflect these rules.

Fixes #855
Fixes #993
@kpdecker
Copy link
Collaborator

Released in 3.0.2

@kpdecker kpdecker modified the milestone: Next Apr 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants