codemod 1.0.10
codemod: ^1.0.10 copied to clipboard
Write and run automated code modifications on a codebase. Primarily geared towards updating and refactoring Dart code, but can modify any files.
example/readme.md
This directory contains several example codemods:
-
License header inserter
A simple example that inserts license text at the top of a file.
-
Regex substituter
A simple example that uses a RegExp to make replacements over all matches.
-
Remove deprecated elements
Uses an
AstVisitorfrompackage:analyzerto remove all elements annotated with@deprecated. -
Suggest
isEvenorisOddUses an
AstVisitorand fully resolves all source code information and types for a more advanced modification.