@jsrepo/transform-filecasing

A transform plugin for transforming file and folder names to different case formats before they are added to your project.
Usage
Run the following command to install and add the transform to your config:
jsrepo config transform filecasing
Manual Configuration
Install the transform plugin:
pnpm install @jsrepo/transform-filecasing -D
Add the transform to your config:
import { defineConfig } from "jsrepo";
import fileCasing from "@jsrepo/transform-filecasing";
export default defineConfig({
transforms: [fileCasing({ to: "camel" })],
});
Options
to | "kebab" | "camel" | "snake" | "pascal" | The target case format for file and folder names |
transformDirectories | boolean | Whether to transform directory segments in the path. When false, only the filename baseName is transformed. Defaults to true |
Examples
Transform both directories and filenames (default behavior):
import { defineConfig } from "jsrepo";
import fileCasing from "@jsrepo/transform-filecasing";
export default defineConfig({
transforms: [fileCasing({ to: "pascal" })],
});
Transform only filenames, preserve directory names:
import { defineConfig } from "jsrepo";
import fileCasing from "@jsrepo/transform-filecasing";
export default defineConfig({
transforms: [fileCasing({ to: "camel", transformDirectories: false })],
});