|
| 1 | +# Overview |
| 2 | + |
| 3 | +## What are codemods? |
| 4 | + |
| 5 | +A codemod is a function that takes files as input and output. It reads the files of interest, makes some changes, then saves the result to your disk. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +One special case is the identity function. That is, not all codemods need to make a change. As a result, linters are a codemod. Tools that gather files, collect metrics, analyze package dependencies, or find vulnerabilities are also one. |
| 10 | + |
| 11 | +In short, codemods are everywhere and you’ve likely used a few already. |
| 12 | + |
| 13 | + |
| 14 | +## What is codemod-utils? |
| 15 | + |
| 16 | +`@codemod-utils` provides a set of **tools and conventions** to help you write codemods. Use `@codemod-utils/cli` to get started. |
| 17 | + |
| 18 | +```sh {:no-line-numbers} |
| 19 | +pnpx @codemod-utils/cli <your-codemod-name> |
| 20 | +``` |
| 21 | + |
| 22 | + |
| 23 | +### Package overview |
| 24 | + |
| 25 | +- [@codemod-utils/ast-javascript](https://github.com/ijlee2/codemod-utils/tree/main/packages/ast/javascript/README.md) |
| 26 | +- [@codemod-utils/ast-template](https://github.com/ijlee2/codemod-utils/tree/main/packages/ast/template/README.md) |
| 27 | +- [@codemod-utils/ast-template-tag](https://github.com/ijlee2/codemod-utils/tree/main/packages/ast/template-tag/README.md) |
| 28 | +- [@codemod-utils/blueprints](https://github.com/ijlee2/codemod-utils/tree/main/packages/blueprints/README.md) |
| 29 | +- [@codemod-utils/cli](https://github.com/ijlee2/codemod-utils/tree/main/packages/cli/README.md) |
| 30 | +- [@codemod-utils/ember](https://github.com/ijlee2/codemod-utils/tree/main/packages/ember/README.md) |
| 31 | +- [@codemod-utils/files](https://github.com/ijlee2/codemod-utils/tree/main/packages/files/README.md) |
| 32 | +- [@codemod-utils/package-json](https://github.com/ijlee2/codemod-utils/tree/main/packages/package-json/README.md) |
| 33 | +- [@codemod-utils/tests](https://github.com/ijlee2/codemod-utils/tree/main/packages/tests/README.md) |
| 34 | + |
| 35 | + |
| 36 | +## Made with @codemod-utils |
| 37 | + |
| 38 | +1. [@ember-intl/lint](https://github.com/ember-intl/ember-intl/tree/main/packages/ember-intl-lint) |
| 39 | +1. [@ember-intl/vite](https://github.com/ember-intl/ember-intl/tree/main/packages/ember-intl-vite) |
| 40 | +1. [analyze-ember-project-dependencies](https://github.com/ijlee2/analyze-ember-project-dependencies) |
| 41 | +1. [blueprints-v2-addon](https://github.com/ijlee2/create-v2-addon-repo/tree/main/packages/blueprints-v2-addon) |
| 42 | +1. [codemod-generate-release-notes](https://github.com/Ajanth/codemod-generate-release-notes) |
| 43 | +1. [create-v2-addon-repo](https://github.com/ijlee2/create-v2-addon-repo/tree/main/packages/create-v2-addon-repo) |
| 44 | +1. [ember-codemod-add-component-signatures](https://github.com/ijlee2/ember-codemod-add-component-signatures) |
| 45 | +1. [ember-codemod-add-missing-tests](https://github.com/ijlee2/ember-codemod-add-missing-tests) |
| 46 | +1. [ember-codemod-add-template-tags](https://github.com/ijlee2/ember-codemod-add-template-tags) |
| 47 | +1. [ember-codemod-css-modules](https://github.com/simplepractice/ember-codemod-css-modules) |
| 48 | +1. [ember-codemod-ember-render-helpers-to-v1](https://github.com/buschtoens/ember-render-helpers/tree/main/packages/ember-codemod-ember-render-helpers-to-v1) |
| 49 | +1. [ember-codemod-pod-to-octane](https://github.com/ijlee2/ember-codemod-pod-to-octane) |
| 50 | +1. [ember-codemod-remove-ember-css-modules](https://github.com/ijlee2/embroider-css-modules/tree/main/packages/ember-codemod-remove-ember-css-modules) |
| 51 | +1. [ember-codemod-remove-global-styles](https://github.com/ijlee2/embroider-css-modules/tree/main/packages/ember-codemod-remove-global-styles) |
| 52 | +1. [ember-codemod-remove-inject-as-service](https://github.com/ijlee2/ember-codemod-remove-inject-as-service) |
| 53 | +1. [ember-codemod-rename-test-modules](https://github.com/ijlee2/ember-codemod-rename-test-modules) |
| 54 | +1. [ember-codemod-sort-invocations](https://github.com/ijlee2/ember-codemod-sort-invocations) |
| 55 | +1. [ember-codemod-v1-to-v2](https://github.com/ijlee2/ember-codemod-v1-to-v2) |
| 56 | +1. [prettier-plugin-ember-hbs-tag](https://github.com/ijlee2/prettier-plugin-ember-hbs-tag/) |
| 57 | +1. [type-css-modules](https://github.com/ijlee2/embroider-css-modules/tree/main/packages/type-css-modules) |
| 58 | +1. [update-workspace-root-version](https://github.com/ijlee2/update-workspace-root-version) |
0 commit comments