esdown icon indicating copy to clipboard operation
esdown copied to clipboard

Add options for bypassing various translations

Open zenparsing opened this issue 10 years ago • 8 comments

This would be useful for bypassing block-scope translation when just running ES6 code directly on node/iojs.

zenparsing avatar Feb 17 '15 06:02 zenparsing

:+1:

yukulele avatar Jul 01 '15 18:07 yukulele

:+1: very interested in this feature.

gr0uch avatar Sep 04 '15 13:09 gr0uch

@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.

zenparsing avatar Sep 04 '15 14:09 zenparsing

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.

gr0uch avatar Sep 04 '15 15:09 gr0uch

agree with @0x8890

yukulele avatar Sep 09 '15 12:09 yukulele

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)

gr0uch avatar Sep 15 '15 13:09 gr0uch

@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

zenparsing avatar Sep 15 '15 14:09 zenparsing

oops, I read this compatibility table and just assumed that it was hiding behind a flag.

gr0uch avatar Sep 15 '15 14:09 gr0uch