Skip to content

Commit e27605d

Browse files
committed
Doc
1 parent 6beadfc commit e27605d

File tree

3 files changed

+33
-10
lines changed

3 files changed

+33
-10
lines changed

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33
"version": "0.0.0",
44
"private": false,
55
"bin": "./codemod.js",
6+
"files": [
7+
"./codemod.js",
8+
"src"
9+
],
610
"scripts": {
711
"lint": "eslint eslint.config.mjs codemod.js src",
812
"pretest": "npm run lint",
913
"test": "vitest --run"
1014
},
1115
"description": "Applies code modifications to assist with upgrades",
1216
"devDependencies": {
13-
"eslint": "^9.16.0",
17+
"eslint": "^9.17.0",
1418
"eslint-config-openlayers": "^20.0.0",
1519
"vitest": "^2.1.8"
1620
},

readme.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# @openlayers/codemod
2+
3+
Automated code modifications to assist with OpenLayers upgrades.
4+
5+
## replace-barrel-imports
6+
7+
Rewrite imports from ["barrel files"](https://www.google.com/search?q=barrel+files).
8+
9+
```bash
10+
# rewrite imports in all .js and .mjs files in the path/to/files directory
11+
npx @openlayers/codemod replace-barrel-imports path/to/files
12+
```
13+
14+
See additional options with the `help` command (or `--help` flag).
15+
16+
```bash
17+
# see options for the command
18+
npx @openlayers/codemod help replace-barrel-imports
19+
```

0 commit comments

Comments
 (0)