@vibe/codemod
v4.0.0
Published
Vibe's component library migration tool
Keywords
Readme
@vibe/codemod
Vibe Design System's Codemods and CLI tools for automating migrations and transformations
The @vibe/codemod package is designed to automate the migration to the latest version of the Vibe design system. It applies specific transformations to your codebase based on the migration type you choose. The tool can be run interactively or via command-line arguments.
Usage
To run, use the following command:
npx @vibe/codemod [options]Options
--migration (alias: -m)
Description: Specifies which migration type to run (e.g.,
v3,v4).Choices:
v3,v4Required: Yes
Example:
npx @vibe/codemod --migration v4
--target (alias: -t)
Description: Specifies the target directory where the transformations will be applied.
Default: Current working directory (
process.cwd())Required: No
Example:
npx @vibe/codemod --target /path/to/your/project
--extensions (alias: -x)
Description: Specifies which file extensions to include for the migration.
Choices:
jsx,tsx,js,tsDefault:
jsx,tsxRequired: No
Example:
npx @vibe/codemod --extensions jsx tsx
--verbose (alias: -v)
Description: Enables verbose mode. When enabled, detailed logs of the transformation process will be printed.
Default:
falseExample:
npx @vibe/codemod --verbose
--yes (alias: -y)
Description: Skip confirmation prompts and auto-proceed when Git working directory is not clean.
Default:
falseExample:
npx @vibe/codemod --yes
Included Migrations
The following migrations are included in this CLI:
v3 Migration
- Migration Type:
v3(--migration v3) - Description: This migration transforms components and files to comply with version 3 of @vibe/code.
v4 Migration
- Migration Type:
v4(--migration v4) - Description: This migration transforms components and files to comply with version 4 of @vibe/core. Handles breaking changes including component API updates, type changes, and package structure modifications.
enums Migration
- Migration Type:
enums(--migration enums) - Description: This migration transforms enums to TS types with version 3 of @vibe/code.
