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

Try to remove the need of angular-babel in Meteor 1.3 #1192

Closed
Urigo opened this issue Feb 5, 2016 · 6 comments
Closed

Try to remove the need of angular-babel in Meteor 1.3 #1192

Urigo opened this issue Feb 5, 2016 · 6 comments
Milestone

Comments

@Urigo
Copy link
Owner

Urigo commented Feb 5, 2016

Try to add all the features angular-babel has to the official ecmascript package so that we won't need to add it anymore in Meteor 1.3.
If not released in Meteor 1.3, update angular-babel to use the latest Babel as similar as possible to Meteor's.

Need to add "es7.decorators" and add babelHelpers like in here: https://github.com/Urigo/angular2-meteor/blob/feature/meteor1.3/tests/packages/babel-runtime/babel-runtime.js#L277-L337

Also related:
meteor/meteor#6028
meteor/meteor#6057

@pbastowski @kamilkisiela

@Urigo Urigo added this to the Backlog milestone Feb 5, 2016
@pbastowski
Copy link
Contributor

@Urigo

We could also recommend that people use TypeScript instead of angular-babel / ecmascript packages, because:

  1. TS already supports Decorators, and
  2. in most cases TS can be used as a direct drop-in replacement for Babel (this is especially easy if the user does not care about type checking, just transpiling to ES5)

People would have to use the .ts extensions instead of .js, but that's about it. I have replaced Babel with TypeScript in one of my production apps without any side effects. I see this as a viable option.

Do you think this is an option?

@Urigo
Copy link
Owner Author

Urigo commented Feb 6, 2016

@pbastowski that's a good idea.
I think we should provide the 2 options though, and specifically make the ES2015 option easier.

On the Typescript point, what package do you use today? please have a look at this discussion about adding an official typescript package - Urigo/angular2-meteor#102

@pbastowski
Copy link
Contributor

@Urigo
I agree, that Meteor's own ecmascript package should either provide decorators by default or allow us to easily add optional Babel components, such as decorators.

As far as typescript goes, I use my pbastowski:typescript package in my projects. It works exactly the same as my angular-babel package, except that it uses the TypeScript compiler instead of Babel. Also, it does not ng-annotate, but I think we don't need ng-annotate any more, especially if users use my angular2-now library, which includes injection into classes.

So, whose typescript package will be the one to rule them all :) ???

@Urigo
Copy link
Owner Author

Urigo commented Feb 8, 2016

About Typescript - look in the issue - this one - https://github.com/barbatus/ts-compilers

@mgrivera
Copy link

Hi @pbastowski,

If we start using typescript in 1.3 as you suggest, and I will be glad if we could, are we going to miss the source mapping mechanism that we have right now? You now this is a big issue for me! And you helped me to solve this issue in the current version.

I mean: are we going to "see" our typescript code in chrome debugger (or just the transpiled one)?

Thanks and bye ...

@dotansimha
Copy link
Collaborator

I think we can close this issue, since Meteor supports now .babelrc (meteor/meteor#6028) and we can solve the issue with the decorators :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants