← All recipes
Moderne licensed

Rename file

Recipe IDorg.openrewrite.angular.migration.rename-fileArtifact@openrewrite/recipes-angular

Renames files matching a glob pattern to a new file name, preserving the directory.

Single recipeProprietary

Usage

You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.angular.migration.rename-file --recipe-option "fileMatcher=**/browserslist" --recipe-option "fileName=.browserslistrc"

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-angular

Options

NameTypeDescription
fileMatcherrequiredGlob pattern to match files (e.g., **/browserslist). Supports ** prefix to match in any directory.
e.g. **/browserslist
fileNamerequiredThe new file name (just the basename, e.g., .browserslistrc).
e.g. .browserslistrc