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

Custom plugins in REPL. #1211

Closed
DylanPiercey opened this issue Mar 24, 2017 · 11 comments
Closed

Custom plugins in REPL. #1211

DylanPiercey opened this issue Mar 24, 2017 · 11 comments

Comments

@DylanPiercey
Copy link
Contributor

DylanPiercey commented Mar 24, 2017

I was just thinking it'd be pretty cool to extend the preset options to have a text input where you could put in whatever plugin you want (e.g.: babel-plugin-closure-elimination) and it would then try to download it from unpkg and enable it. To keep it simple it could just be a comma separated list of custom plugins.

This would make quickly trying a plugin trivial on the website.

@existentialism
Copy link
Member

@DylanPiercey we agree! #858

Definitely something we'd love to do, but have been busy with other things. Would love help :P

@DylanPiercey
Copy link
Contributor Author

Ah thanks for the link. I was looking through and I don't think it'd be to bad. Perhaps I'll give a shot if I get some free time next week.

@existentialism
Copy link
Member

Awesome, looking forward to it!

@hzoo
Copy link
Member

hzoo commented Mar 24, 2017

@DylanPiercey the issue I had with unpkg is that we would need to require plugins to do a umd build type thing unless we also run webpack on the fly

@DylanPiercey
Copy link
Contributor Author

@hzoo what about switching to wzrd? You can easily bundle things as a standalone UMD module. Example.

@hzoo
Copy link
Member

hzoo commented Mar 24, 2017

Yeah we can do that, just can get kinda big, but if it works we can try!

@hzoo
Copy link
Member

hzoo commented Mar 24, 2017

I think it will make a lot more sense with babel 7 since we got rid of babel-runtime for deps, and we have the polyfill to the repl

@DylanPiercey
Copy link
Contributor Author

@hzoo I think the user would more/less expect it to take some time to fetch third party modules so I don't think it'd be too much of an issue.

Also with wzrd they have a '/multi' api which we could use in this case to bundle all of the presets together.

@hzoo
Copy link
Member

hzoo commented Mar 24, 2017

Oh ok cool! I'm not that knowledge about wzrd but that sounds great - I really want this feature!

btw have you joined our slack? can talk in #website

other sites that do this are https://runkit.com, https://github.com/christianalfoni/webpack-bin

@DylanPiercey
Copy link
Contributor Author

@hzoo could you point me to the place where the current presets are loaded?

@hzoo
Copy link
Member

hzoo commented Mar 24, 2017

Messaged on slack, but https://github.com/babel/babel.github.io/blob/master/scripts/repl.js#L32, via babel-standalone

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

No branches or pull requests

3 participants