ga2mer / atom-lebab

Atom package for convert es5 to es6/7 use lebab
https://atom.io/packages/lebab
MIT License
21 stars 1 forks source link

Allow choosing the transforms to apply #2

Closed nene closed 8 years ago

nene commented 8 years ago

With upgrade to Lebab 2.0 (pull request #1) it no more makes sense to enable all the transforms by default.

The main culprit is the exponent transform for ES7, but one should in general be allowed to pick which transforms he wants to apply (like the commonjs won't be applicable if you want to limit yourself to what browsers natively support, or the template transform might too aggressively refactor your string concatenations).

I see two main ways of achieving this:

nene commented 8 years ago

I saw that there is an alternative Lebab package for Atom: atom-lebab-convert.

Unlike this package, it implements some configuration options, but I think it's inferior in the way it actually integrates with Lebab. So I proposed merging it into this project: https://github.com/jaunkst/atom-lebab-convert/issues/3

There probably isn't any actual code to bring over, but one could transfer some knowledge, like adopt a similar way of setting up configuration.

ga2mer commented 8 years ago

Configuration option to specify the transforms to apply. Released in 0.1.0 and thanks for programming API

nene commented 8 years ago

Ah... that's quite nice.