google / traceur-compiler

Traceur is a JavaScript.next-to-JavaScript-of-today compiler
Apache License 2.0
8.18k stars 578 forks source link

Better integration for regexpu #2002

Open jamiebuilds opened 8 years ago

jamiebuilds commented 8 years ago

I opened an issue in the regexpu transpiler repo about creating a Babel plugin instead of pulling in esprima, recast, and other big npm packages.

I'm sure you're interested in doing the same since the npm downloads are quite heavy.

regexpu is quite nicely contained in that the actual visitor for transpiling is separated from all the logic to update the regex. The resulting Babel plugin is <20 LoC, which is a huge win for not having to pull in everything else. I'm not very familiar with the traceur codebase, but I imagine it would fairly easy for you to do the same.

/cc @mathiasbynens