Utilities for writing codemods
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.
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.
In short, codemods are everywhere and you’ve likely used a few already.
codemod-utils provides a set of tools and conventions to help you write codemods. Use @codemod-utils/cli to get started.
pnpx @codemod-utils/cli <your-codemod-name>@codemod-utils/ast-javascript@codemod-utils/ast-template@codemod-utils/ast-template-tag@codemod-utils/blueprints@codemod-utils/cli@codemod-utils/ember@codemod-utils/files@codemod-utils/package-json@codemod-utils/tests
@ember-intl/lint@ember-intl/viteanalyze-ember-project-dependenciesblueprints-v2-addoncodemod-generate-release-notescreate-v2-addon-repoember-codemod-add-component-signaturesember-codemod-add-missing-testsember-codemod-add-template-tagsember-codemod-css-modulesember-codemod-ember-render-helpers-to-v1ember-codemod-pod-to-octaneember-codemod-remove-ember-css-modulesember-codemod-remove-global-stylesember-codemod-remove-inject-as-serviceember-codemod-rename-test-modulesember-codemod-sort-invocationsember-codemod-v1-to-v2prettier-plugin-ember-hbs-tagtype-css-modulesupdate-workspace-root-version
See the Contributing guide for details.
This project is licensed under the MIT License.
