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

Enhanced Examples #1263

Open
1 of 6 tasks
hzoo opened this issue Jun 12, 2017 · 0 comments
Open
1 of 6 tasks

Enhanced Examples #1263

hzoo opened this issue Jun 12, 2017 · 0 comments

Comments

@hzoo
Copy link
Member

hzoo commented Jun 12, 2017

Ref #59

Maybe this is just weird, but it would be pretty cool to see real world examples of specific syntax out out on github. So if you are learning about arrow functions we can provide some basic examples but maybe you'd like to see how it's used in an actual codebase?

  • examples we can come up with (simple, easy to learn) REPL: Examples #59
  • examples from our unit tests (basically "syntax" coverage, but not as helpful to developers to learn from)
  • examples from babel/github itself (no context but more real world usage)
    • hardcode a script to find kinds of syntax, or create an AST/Babel grep kind of tool that prints a codeframe of the relevant syntax
    • Use GitHub Archive/Google BigQuery's database to search github for uses of a certain syntax/pattern (filter JS repositories, filter by stars, date)? (may need to pin the commit/file)
    • populate examples?

For example: Searching on github for JS repositories with a > 1000 stars, https://github.com/reactjs/react-redux/blob/7337f1a5de42c76b69e56f713ac933aedcb12867/src/connect/connect.js#L31 has an example of an arrow function

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

1 participant