Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make a babel-plugin ? #16

Open
p2227 opened this issue Sep 23, 2016 · 5 comments
Open

make a babel-plugin ? #16

p2227 opened this issue Sep 23, 2016 · 5 comments

Comments

@p2227
Copy link

p2227 commented Sep 23, 2016

a babal-plugin can parse more es6 code
and can be more easy to integrate with gulp/webpack.

@vigneshshanmugam
Copy link
Contributor

webpack - https://github.com/vigneshshanmugam/optimize-js-plugin
gulp - https://github.com/prateekbh/gulp-optimize-js

@austinkelleher
Copy link
Contributor

@nkt
Copy link

nkt commented Sep 24, 2016

I've just seen this project and tried to implement this as babel plugin. Unfortunately this functionality should be implemented in babel-generator instead of plugin.
How babel works: code -> AST ( -> plugins) -> code. If you want to change AST -> code behaviour, you should add option to babel-generator, which transform AST into code and create plugin, which enables this option.
Babel is not so much modular as we thought 😞

@p2227
Copy link
Author

p2227 commented Sep 24, 2016

maybe use it indepent and use the babel-transform in the core because of this

@vigneshshanmugam
Copy link
Contributor

Babel will address this pretty soon, @nolanlawson I think you can close this issue :)

Check here - babel/babel#4615 and this babel/babel#4621

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants