Skip to content

Commit

Permalink
fix(docs): document the --zip flag in the plasmo build CLI (#1051)
Browse files Browse the repository at this point in the history
Document the `--zip` flag in the `plasmo build` CLI

The `plasmo build` CLI supports a `--zip` flag which builds your
extension and then packages it into a ZIP file.

This is mentioned in the Plasmo docs, but not in the in-CLI
help, which I found confusing.

This adds it to the help output, in the process splitting the
documentation for the `dev` and `build` commands.
  • Loading branch information
timrogers authored Aug 26, 2024
1 parent b5994f1 commit bed1eec
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions cli/plasmo/src/features/helpers/flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,26 @@ export const getFlagMap = () => {
}
}

const DEV_BUILD_COMMON_ARGS = ` --target [string] set the target (default: chrome-mv3)
--tag [string] set the build tag (default: dev or prod depending on NODE_ENV)
--src-path [path] set the source path relative to project root (default: src)
--build-path [path] set the build path relative to project root (default: build)
--entry entry point name (default: popup)
--env relative path to top-level env file`

export const flagHelp = `
init
--entry entry files (default: popup)
--with-<name> use an example template
dev/build
dev
--target [string] set the target (default: chrome-mv3)
--tag [string] set the build tag (default: dev or prod depending on NODE_ENV)
--src-path [path] set the source path relative to project root (default: src)
--build-path [path] set the build path relative to project root (default: build)
--entry entry point name (default: popup)
--env relative path to top-level env file
${DEV_BUILD_COMMON_ARGS}
build
${DEV_BUILD_COMMON_ARGS}
--zip zip the build output
`

0 comments on commit bed1eec

Please sign in to comment.