3 ms·
Seems weird to not see Google's closure compiler on a list about JS dev tools that includes a linter. I haven't gotten around to playing with Babel or ES6, and
by dahart 11y ago
Seems weird to not see Google's closure compiler on a list about JS dev tools that includes a linter.
I haven't gotten around to playing with Babel or ES6, and I want to. I haven't bothered to Google it yet, but anybody have experience with Babel + Closure compiler? Is it easy, or difficult and inconvenient, or not possible?
- timothya 11y agoThe Closure Compiler supports compiling ES6 code already, and can also do transpilation down to ES3/ES5. [1][2] Google also has the Traceur Compiler which does transpilation of new JS features (ES6, ES7 proposals, and a couple of features that aren't in either) into older versions. [3] [1]: https://github.com/google/closure-compiler/wiki/Releases#october-15-2015-v20151015 https://github.com/google/closure-compiler/wiki/Releases#oct... [2]: https://github.com/google/closure-compiler/wiki/ECMAScript6#transpilation https://github.com/google/closure-compiler/wiki/ECMAScript6#... (might be a bit out of date, since there have been releases since that document was last edited) [3]: https://github.com/google/traceur-compiler https://github.com/google/traceur-compiler
- dahart 11y agoHoly crap, I wasn't paying attention and missed that annoucement... awesome! Thanks, I have no excuse not to try it now. Poking around, Traceur looks like something to play with and get acquainted, but not for production code just yet?
- ericelliott 11y agoIMO, the main benefit of Closure Compiler are the type checking errors. However, it's a pretty heavy handed solution for that compared to existing tools like JSDoc + TernJS, or DefinitelyTyped TS annotations. It relies heavily on JSDoc, and I believe JSDoc has had its time, and is on its way out (being replaced by tools like Flow, TypeScript, rtype/rfx).