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

Add sandbox to babel/website plugin docs #42

Open
6 tasks
ianjennings opened this issue Jul 30, 2020 · 4 comments
Open
6 tasks

Add sandbox to babel/website plugin docs #42

ianjennings opened this issue Jul 30, 2020 · 4 comments
Assignees

Comments

@ianjennings
Copy link
Member

ianjennings commented Jul 30, 2020

image

Every Babel plugin includes an example "in, out, and config" in the docs:

https://babeljs.io/docs/en/babel-plugin-minify-mangle-names

With our sandbox, we'd be able to render these interactively.

  • Find out where they are generated from, my guess is babel/website
  • Find the plugin string, config, and in properties
  • Map these properties into a query string, ex: babelsandbox.com/?plugin=:pluginString&in=:in
  • Use the query string to embed an iframe, ex: <iframe src="..."></iframe>
  • Hook into the documentation generator to create an iframe within the docs.
  • Submit a pull request to babel/web (our site should be live by then)
@ianjennings ianjennings added this to the #4 - 8/21/2020 milestone Jul 30, 2020
@ianjennings ianjennings changed the title Can we improve the Babel Plugin Docs? Add sandbox to babel-plugin docs Jul 30, 2020
@ianjennings ianjennings changed the title Add sandbox to babel-plugin docs Add sandbox to babel/website plugin docs Jul 30, 2020
@wlawt wlawt modified the milestones: #3 - 8/14/2020, Backlog Aug 12, 2020
@garrettluu garrettluu self-assigned this Aug 13, 2020
@garrettluu
Copy link
Member

https://github.com/babel/website/tree/master/docs

Parsing the markdown from the website might be more difficult than anticipated due to the inconsistencies between the documentation of different plugins. Most have an example input and output, but some other ones have different formats/explanation like this one

@ianjennings
Copy link
Member Author

Ooooph, ok. Can you:

  1. get a count of those we can parse (fit the format)
  2. make a list of ones we can do manually

@ianjennings
Copy link
Member Author

ianjennings commented Aug 17, 2020

We can do this entire ticket manually if need be.

@ianjennings
Copy link
Member Author

I think there are like 130 plugins?

@ianjennings ianjennings removed this from the Backlog milestone Aug 19, 2020
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

4 participants