Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaub committed Dec 14, 2024
1 parent 6beadfc commit e27605d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 10 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
"version": "0.0.0",
"private": false,
"bin": "./codemod.js",
"files": [
"./codemod.js",
"src"
],
"scripts": {
"lint": "eslint eslint.config.mjs codemod.js src",
"pretest": "npm run lint",
"test": "vitest --run"
},
"description": "Applies code modifications to assist with upgrades",
"devDependencies": {
"eslint": "^9.16.0",
"eslint": "^9.17.0",
"eslint-config-openlayers": "^20.0.0",
"vitest": "^2.1.8"
},
Expand Down
19 changes: 19 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# @openlayers/codemod

Automated code modifications to assist with OpenLayers upgrades.

## replace-barrel-imports

Rewrite imports from ["barrel files"](https://www.google.com/search?q=barrel+files).

```bash
# rewrite imports in all .js and .mjs files in the path/to/files directory
npx @openlayers/codemod replace-barrel-imports path/to/files
```

See additional options with the `help` command (or `--help` flag).

```bash
# see options for the command
npx @openlayers/codemod help replace-barrel-imports
```

0 comments on commit e27605d

Please sign in to comment.