diff --git a/cli/plasmo/src/commands/init.ts b/cli/plasmo/src/commands/init.ts index f3eb03a2b..e1eff6670 100644 --- a/cli/plasmo/src/commands/init.ts +++ b/cli/plasmo/src/commands/init.ts @@ -1,6 +1,6 @@ import { resolve } from "path" import { cwd } from "process" -import { paramCase } from "change-case" +import { kebabCase } from "change-case" import { hasFlag } from "@plasmo/utils/flags" import { ensureWritableAndEmpty } from "@plasmo/utils/fs" @@ -26,7 +26,7 @@ async function init() { // For resolving project directory const projectDirectory = resolve( currentDirectory, - paramCase(rawName) || rawName + kebabCase(rawName) || rawName ) vLog("Project directory:", projectDirectory) diff --git a/cli/plasmo/src/features/helpers/flag.ts b/cli/plasmo/src/features/helpers/flag.ts index ca7e3f1c2..fdd715153 100644 --- a/cli/plasmo/src/features/helpers/flag.ts +++ b/cli/plasmo/src/features/helpers/flag.ts @@ -1,4 +1,4 @@ -import { paramCase } from "change-case" +import { kebabCase } from "change-case" import { getFlag } from "@plasmo/utils/flags" @@ -13,7 +13,7 @@ export const getFlagMap = () => { process.env.PLASMO_TAG || (process.env.NODE_ENV === "production" ? "prod" : "dev") - const target = paramCase( + const target = kebabCase( getFlag("--target") || process.env.PLASMO_TARGET || "chrome-mv3" )