vazco / universe-modules

Use ES6 / ES2015 modules in Meteor with SystemJS
https://atmospherejs.com/universe/modules
MIT License
52 stars 7 forks source link

Enables decorators support #12

Closed ghost closed 9 years ago

ghost commented 9 years ago

I want to use the Angular2 Dependency Injection. So I need this feature enabled. I think enabling it by default doesn't harm anyone who doesn't use it.

MacRusher commented 9 years ago

OK I'm gonna add it for now, but in the future we need to find a way to customize and opt-in for features on app/package basis. Maybe Meteor 1.2 will bring something new into that matter.

ghost commented 9 years ago

To make it configurable you can use this approach: https://github.com/grigio/meteor-babel/blob/master/plugin/compile-6to5.js#L49-L57.

MacRusher commented 9 years ago

Very good idea. Just need to check if it works on per package basis (e.g. some packages might want to use decorators but main app don't)

ghost commented 9 years ago

I think published packages get compiled with doing meteor publish. Local packages would use the app config file.

Not sure if grigio:babel also supports the have this config file in a package that should get published. If you need a ES2015 package to test, you can use https://github.com/meteor-velocity/velocity-helpers. ;-)