You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each codemod recides in its own directory inside the `codemods` folder. For initializing a new codemod, you can use the following command in the root of the repository and change the parameters as needed:
Then, rename the `scripts` folder to `src` to keep it consistent with the rest of the repository. After that, you can start implementing your codemod by editing the `codemod.yaml` file and adding any additional files your codemod requires.
Express.js provides Codemod transforms to help you upgrade your express server when a feature is deprecated or removed.
8
6
9
7
Codemods are transformations that run on your codebase programmatically. This allows for a large amount of changes to be applied without having to manually go through every file.
10
8
11
-
## Installation
9
+
## Usage
12
10
13
-
You don't need to install this package, run the following command:
11
+
### From Registry
14
12
15
-
```sh
16
-
npx @expressjs/codemod # or pnpx, bunx, etc.
17
-
```
18
-
19
-
or install globally:
13
+
With the codemod CLI you can run a workflow from the Codemod Registry. Replace `<codemod>` with the name of the codemod you want to run:
20
14
21
15
```sh
22
-
npm i -g @expressjs/codemod# or pnpm, bun, etc.
16
+
npx codemod @expressjs/<codemod>
23
17
```
24
18
25
-
## Usage
19
+
For see the list of available codemods, visit the [Express.js Codemod Registry](https://codemod.link/express).
26
20
27
-
Use `@expressjs/codemod -h` to explore available command-line options.
21
+
### From source
28
22
29
-
<!-- USAGE START -->
23
+
You can also clone the repository and run the codemods locally. First, clone the repository:
0 commit comments