PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
10.29k stars 356 forks source link

fix(docs): document the `--zip` flag in the `plasmo build` CLI #1051

Closed timrogers closed 1 month ago

timrogers commented 1 month ago

Details

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.

Code of Conduct

Contacts

If your PR is accepted, we will award you with the Contributor role on Discord server.

To join the server, visit: https://www.plasmo.com/s/d

timrogers commented 1 month ago

After this change, the output looks like this:

🟣 Plasmo v0.88.0
🔴 The Browser Extension Framework
🟠 CMDS   | help | start | init | dev | build | package | version | -v | --version
🟡 OPTS   |

    init

      --entry                     entry files (default: popup)
      --with-<name>               use an example template

    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

    build

      --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
      --zip                       zip the build output