Blaze Components now have namespaces


So you can structure your code in your projects and share components with others without worrying about naming conflicts.


Ooooh… you’re rocking-and-rolling with this new components package! :smile:

Hey… would you accept a PR that translates the into javascript? This seems very much like the kind of package the community could rally around; and if not get pulled into core directly, then at least provide a lot of inspiration to the core dev team. But they’re going to want to see JavaScript, as per the Meteor styleguide, I think.


I would not. I think that for now as it is it allows me much easier development of the package. It is true that it probably makes harder to contribute for some, those who are not familiar with the CoffeeScript.

Of course this can be translated to JavaScript if it would be moving into Meteor core. But I would do that then (because it will probably require also some other changes) and not yet now. But yea, at that stage code should of course be made according to Meteor code style.

On the other hand, I am OK with people making pull request with code in JavaScript. This can coexist in the package (or I can even translate them to CoffeeScript before pulling them in).

Also, package is meant to be extended with other packages, so other packages can be made in JavaScript, of course.


Fair enough. :slight_smile:

Well, the namespaces are exciting, and it’s exciting to see the momentum with this package.

What about babel vs harmony? I agree that harmony has better semantics, but there appears to be some initial support for es6 from MDG by way of the babel library. Does it make sense to migrate towards babel since MDG has some prototypes using it and a dev package in the es6 branch?


What do you mean with babel vs. harmony? Harmony == ES6 (codename for it) and Babel is a polyfill for ES6? So yes, if you want to use ES6 now, you use Babel. But I do not see how has one better semantics over the other, they should be the same, just one is native and the other is polyfill?

Or are you talking about Traceur vs. Babel? I use Traceur just for tests, to assure ES6 compatibility of Blaze Components. I do not really care about what I use there. I thought though that it is only ES6, now I see that Traceur has some additional features. So probably I should not be using it? I care only about ES6 compatibility. So if you know some other Meteor package providing ES6 support, I can switch to it in tests. But I think tests are pure ES6, nothing special there. No?

In any case, you can use Blaze Components with native ES6 or any other ES6 polyfill you want.