Skip to content

Commit e6f7f57

Browse files
Further improve README running codemods section
- Add caution warning about codemods editing code - Simplify codemod command examples - Remove placeholder sections and outdated instructions - Add concrete example with @nodejs/tmpDir-to-tmpdir - Streamline documentation structure
1 parent 6e14d52 commit e6f7f57

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

README.md

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,19 @@
88
This repository contains codemods for <FRAMEWORK_OR_SDK_NAME>. These codemods facilitate adopting new features and upgrading across breaking changes.
99

1010

11-
## Running Codemods
12-
13-
To run your codemods use the codemod command below:
11+
## Running codemods
12+
> [!CAUTION]
13+
> Codemods edit your code. Run them only on files tracked by Git, and make sure to commit or stash your changes first.
1414
15+
Run codemods from the registry by using the names defined in their codemod.yaml:
1516
```bash
16-
npx codemod@latest @<NAMESPACE>/<codemod-name>
17+
npx codemod@latest <codemod-name>
1718
```
18-
19-
- `codemod-name` - name of transform. Use the name of your codemod in Codemod Registry.
20-
21-
See the [Codemod CLI documentation](https://go.codemod.com/cli-docs) for a full list of available commands and options.
22-
23-
## Available Codemods
24-
25-
> [!CAUTION]
26-
> These scripts change source code. Commit or stash your changes before running them.
27-
28-
List your published codemods here, e.g.:
29-
- `@<NAMESPACE>/<MAJOR_VERSION>/example-codemod` — short description
30-
31-
## Important
32-
33-
After using this template, it's recommended that you update this README with:
34-
35-
1. Details about what your codemod does (e.g. before/after code snippets)
36-
2. A link to the published codemod in Codemod Registry
37-
3. The accurate run command
19+
For example:
20+
```
21+
npx codemod@latest @nodejs/tmpDir-to-tmpdir
22+
```
23+
See the [Codemod documentation](https://go.codemod.com/cli-docs) for a full list of available CLI commands and options.
3824

3925
## Contributing
4026

0 commit comments

Comments
 (0)