# codemod **Repository Path**: mirrors_openlayers/codemod ## Basic Information - **Project Name**: codemod - **Description**: Codemods to assist with upgrades - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-12-16 - **Last Updated**: 2026-01-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # @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@latest 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@latest help replace-barrel-imports ``` ## Development Run tests with `npm test`. Debug the tests with `npx vitest --inspect-brk --no-file-parallelism` (then visit `chrome://inspect/#devices`). To run the codemod directly from this repo, so something like `node ./codemod.js replace-barrel-imports --consider-relative-paths ../path/to/other/files`.