mariocasciaro / scatter

IoC container and out-of-the-box extensibility for Node.js applications
MIT License
154 stars 14 forks source link

Support Babel6 transpiled ES6 modules #34

Closed simonihmig closed 8 years ago

simonihmig commented 8 years ago

When using ES6 modules transpiled by Babel6, the default export (POJO, factory, constructor) is under the "default" key, so Scatter is not able to correctly instantiate. This fixes it by detecting transpiled ES6 modules and loading the "default" export.

mariocasciaro commented 8 years ago

Hey @simonihmig thanks for the PR, the code looks good.

simonihmig commented 8 years ago

Thanks for merging. Just btw, came across Scatter through you blog post on DI, and through that also to your book on node.js, bought it and enjoy reading it right now. Good work! :)

mariocasciaro commented 8 years ago

Thanks a lot! I'm very glad you liked the book :). What was your favorite topic? On Jan 30, 2016 12:08 AM, "Simon Ihmig" notifications@github.com wrote:

Thanks for merging. Just btw, came across Scatter through you blog post on DI, and through that also to your book on node.js, bought it and enjoy reading it right now. Good work! :)

— Reply to this email directly or view it on GitHub https://github.com/mariocasciaro/scatter/pull/34#issuecomment-177026841.

simonihmig commented 8 years ago

Oh, I have just started reading it. But I like the approach, not just another beginners guide explaining the basics and all the built-in modules, but a very practical approach on how to structure and design large and scalable apps. Especially for people who have professional experience with other languages, but have to adopt their patters and general thinking in the asynchronous world of node.js! :+1: