hypermod-io / hypermod-community

Community-owned global registry and documentation hub for codemods. Write & run codemods, share them with your friends!
https://hypermod.io
MIT License
133 stars 18 forks source link

Codemods should be able to be co-located with normal NPM packages #48

Closed danieldelcore closed 2 years ago

danieldelcore commented 3 years ago

Codemods should be shareable via normal npm packages.

This would mean that a package like react could create a codeshift.config.js and link transforms.

Codeshift cli will then pull the package and attempt to locate a config file. If that file is not found, it will attempt to pull a codemod from the community folder.

kiprasmel commented 2 years ago

I like this idea. Ideally we'd have another, even simpler way - instead of installing the package from npm, the cli would use a provided path to- / name of- the local package, i.e. the codemod repo (or a repo w/ a codemod) would be cloned from git -- so that it's easier to both update and consume internally, w/o publishing to npm every time.

Ideally w/o having to build either and using ts-node directly.