esdown
esdown copied to clipboard
Add options for bypassing various translations
This would be useful for bypassing block-scope translation when just running ES6 code directly on node/iojs.
:+1:
:+1: very interested in this feature.
@yukulele @0x8890 How would you like to see this feature exposed?
We could have flags for each individual translation feature, or we could could have some kind of "target" argument, that would be smart about what a particular target supports.
I think that flags for individual features would be good. Build targets would be kind of a pain to maintain, though it would be more convenient.
agree with @0x8890
I just wanted to add that for Node v4.0 (or recent chromium/chrome), the only things that I would care about transpiling:
- default function parameters
- es6 module syntax
- destructuring assignment
- spread operator
- ~~class syntax~~ (currently supported in strict mode)
@0x8890 Node v4 supports classes in strict mode (and ES6 modules are always strict mode), and everything else except modules is currently being developed for V8.
https://www.chromestatus.com/features#category: JavaScript
oops, I read this compatibility table and just assumed that it was hiding behind a flag.