|
1 | | -<div align="center"> |
2 | | - <img src=".github/assets/migrations-template.png" alt="<ECOSYSTEM_NAME> Codemods" /> |
3 | | -</div> |
4 | | - |
5 | 1 | > **Remove this section once the repo is customized** |
6 | | -> Framework/SDK maintainers: This template comes with setup guides, utilities, and a GitHub Action to help you and your community build and publish codemods with ease. Once you, the repo maintainers, approve codemod PRs, they’ll be automatically published as official codemods to the [Codemod Registry](https://app.codemod.com/registry) under your org scope. Check out the [Node.js codemods](https://codemod.link/nodejs-official) for an example. See [AUTO_PUBLISH_SETUP.md](.github/AUTO_PUBLISH_SETUP.md) for setup instructions. |
| 2 | +> |
| 3 | +> Framework/SDK maintainers: This template comes with setup guides, utilities, and a GitHub Action to help you and your community build and publish codemods with ease. After the set up, once you approve codemod PRs, they’ll be automatically published as official codemods to the [Codemod Registry](https://app.codemod.com/registry) under your org scope. Check out the [Node.js codemods](https://codemod.link/nodejs-official) for an example. See [AUTO_PUBLISH_SETUP.md](.github/AUTO_PUBLISH_SETUP.md) for setup instructions. |
| 4 | +
|
| 5 | +Official <FRAMEWORK_OR_SDK_OR_ORG> codemods to help users adopt new features and handle breaking changes with ease. |
7 | 6 |
|
8 | | -This repository contains codemods for <FRAMEWORK_OR_SDK_NAME>. These codemods facilitate adopting new features and upgrading across breaking changes. |
| 7 | +Community contributions are welcome and appreciated! Check open issues for codemods to build, or open a new one if something’s missing. See the [contribution guide](./CONTRIBUTING.md) for details. |
9 | 8 |
|
10 | 9 |
|
11 | 10 | ## Running codemods |
12 | 11 | > [!CAUTION] |
13 | | -> Codemods edit your code. Run them only on files tracked by Git, and make sure to commit or stash your changes first. |
| 12 | +> Caution: Codemods modify code! Run them only on Git-tracked files, and commit or stash changes first. |
| 13 | +### From the registry |
| 14 | +Recommended for better UX, downloads the package from [registry](https://app.codemod.com/registry). |
14 | 15 |
|
15 | | -Run codemods from the registry by using the names defined in their codemod.yaml: |
16 | 16 | ```bash |
17 | 17 | npx codemod@latest <codemod-name> |
18 | 18 | ``` |
19 | 19 | For example: |
20 | 20 | ``` |
21 | 21 | npx codemod@latest @nodejs/tmpDir-to-tmpdir |
22 | 22 | ``` |
23 | | -See the [Codemod documentation](https://go.codemod.com/cli-docs) for a full list of available CLI commands and options. |
| 23 | +### From the source |
| 24 | +```bash |
| 25 | +npx codemod workflow run -w /path/to/folder/containing/workflow.yaml |
| 26 | +``` |
24 | 27 |
|
25 | | -## Contributing |
| 28 | +> [!NOTE] |
| 29 | +> By default, codemods run in the current folder. Add `-t /target/path` to your command to change it. |
| 30 | +
|
| 31 | + |
| 32 | +See the [Codemod docs](https://go.codemod.com/cli-docs) for all CLI commands and options. |
26 | 33 |
|
27 | | -See [CONTRIBUTING.md](./CONTRIBUTING.md). |
28 | 34 |
|
29 | 35 | ## Security |
30 | 36 |
|
31 | 37 | See [SECURITY.md](./SECURITY.md). |
32 | 38 |
|
| 39 | + |
33 | 40 | ## License |
34 | 41 |
|
35 | 42 | MIT |
36 | 43 |
|
37 | | - |
|
0 commit comments