Babel is a popular JavaScript compiler that has been installed nearly eight million times and claims dozens of high-profile customers, from Facebook to Netflix to Spotify to Yahoo. The new 6.0.0 release of Babel modularizes the compiler, giving developers the ability to call on just the functionality they need.

The open source compiler has been completely restructured to be as modular as possible, the Babel blog said. “The primary benefit [of modularization] is that people are able to reuse Babel internals for their own projects,” project contributor James Kyle, a JavaScript engineer at CloudFlare, said in an email. “Only need a parser? There’s a package for that. Just a code generator? There’s a package for that.”
[ Find out how to handle the real-world problems faced by developers, with InfoWorld’s professional programmer’s business survival guide. | Keep up with hot topics in programming with InfoWorld’s Application Development newsletter. ]

Modularization also splits up the transpiling layer into its own plug-ins and turns them off by default. This removes the opinions from Babel and ensures it’s a general purpose tool, said Kyle, who also noted that “Babel 5 changed the transformation and traversal pipeline dramatically to make way for some major performance improvements that have been implemented in Babel 6.”

Also, the plug-in API has been simplified in version 6.0.0 after Babel project developers received feedback that the plug-in API was confusing. The developers, though, were still working on integrations for Babel 6.0.0 as well as documentation upon its release late last week.

Adherence to the ECMAScript 2015 specification is a key selling point of the project. Through this compliance, developers are ensured that code they write will not be invalidated in the future. “Babel is the most accurate implementation of ES2015 in a compiler today, and while the transpiling portion of Babel cannot possibly conform 100 percent, that’s the exact goal of the parser. We inch closer to 100 percent compliance every day as people open up issues for every edge case imaginable.”