jamestalmage / generator-codemod

A generator to create codemods quickly.
MIT License
11 stars 1 forks source link

Develop a library of example codemods / starting points: #5

Open jamestalmage opened 8 years ago

jamestalmage commented 8 years ago

Give users a list of examples to choose from, like:

Make it easy to add new templates to the list of examples to encourage community involvement in developing good examples.

When accepting a new template / adding something to the list:

  1. It shouldn't do the same thing as another example.
  2. It shouldn't be something users could easily modify an existing example to do.
sindresorhus commented 8 years ago

Do you intend to add a prompt in the generator to choose a starting point / example? Or is this purely a documentation thing?

jamestalmage commented 8 years ago

Yeah - the prompt thing. I'd want a good default one that we decided was the "best" for people who already knew what they were doing, so you can bypass that prompt quickly.

If we think prompt is unhelpful / too costly, then "a documentation thing" doesn't make sense. We should just contribute examples back to jscodeshift at that point.

jfmengels commented 8 years ago

Sounds like a good idea, if we can provide some helpful starters. I'd prepare some astexplorer links in the comments of the generated file too, so that the user can play with it on the website.