From fabf95aa6e52d0bd0095963b2b8c0aa62327f8d8 Mon Sep 17 00:00:00 2001 From: JoeyDoey Date: Sat, 18 May 2024 10:47:11 -0700 Subject: [PATCH 1/5] feat(cli-commands): ensure build and dev scripts have desc of options/args (browser array) + code clean up --- packages/cli/README.md | 109 ++++++++-------------- packages/cli/src/commands/build.ts | 2 +- packages/cli/src/commands/buildCommand.ts | 2 +- packages/cli/src/commands/dev.ts | 2 +- packages/cli/src/commands/make.ts | 2 - packages/cli/src/commands/zip.ts | 4 +- 6 files changed, 45 insertions(+), 76 deletions(-) diff --git a/packages/cli/README.md b/packages/cli/README.md index b48d862b..ee2aa984 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -37,11 +37,14 @@ The Bedframe Command Line Interface (CLI) lets you make and manage your BED dire

Node Version Requirement

- Bedframe CLI requires Node.js 16+. You can manage multiple versions of Node on the same machine with n, nvm or nvm-windows. + Bedframe CLI requires Node.js version 18+. 20+. You can manage multiple versions of Node on the same machine with n, nvm or nvm-windows.

```bash +# with bun +bun add @bedframe/cli -g + # with pnpm pnpm add @bedframe/cli -g @@ -62,29 +65,28 @@ After installation, you will have access to the `bedframe` executable in your co D E V E L O P M E N T F R A M E W O R K + @bedframe/cli v0.0.78 + + Usage: @bedframe/cli [options] [command] Bedframe CLI - your Browser Extension Development framework (dev utility) Options: - -V, --version output the version number - -h, --help display help for command + -V, --version output the version number + -h, --help display help for command Commands: - make [options] [name] make your B E D - version [options] create or update git release of current version - (changeset version) - publish [options] • publish new or update existing extension(s) - ├ • C W S: Chrome Web Store - ├ • A M O: Mozilla/Firefox Add-ons - └ • M E A: MS Edge Add-ons - dev [browsers] start Vite dev server for one or more browsers - concurrently - build [browsers] generate prod builds for 1 or more browsers concurrently - codemod [options] perform after-build manifest and features code mods (🍝) - by browser - zip [options] [browsers] zip browser dist directories - help [command] display help for command + make [options] [name] make your B E D + version [options] create or update git release of current version (changeset version) + publish [options] publish new or update existing extension(s) + - chrome: Chrome Web Store (C W S) + - firefox: Mozilla/Firefox Add-ons (A M O) + - edge: MS Edge Add-ons (M E A) + dev [browsers] start Vite dev server for one or more browsers concurrently + build [browsers] generate prod builds for 1 or more browsers concurrently + zip [options] [browsers] zip browser dist directories + help [command] display help for command ``` You can check you have the right version with this command: @@ -134,6 +136,7 @@ Alternatively: this command is also available as the standalone [`create-bedfram Command Details ```bash + >_ B R O W S E R @@ -141,6 +144,9 @@ Alternatively: this command is also available as the standalone [`create-bedfram D E V E L O P M E N T F R A M E W O R K + @bedframe/cli v0.0.78 + + Usage: @bedframe/cli make [options] [name] make your B E D @@ -149,28 +155,26 @@ Arguments: name project name Options: - -b, --browsers specify comma-separated list browsers (chrome, edge, - firefox) - -v, --version specify project version (0.0.1) - -d, --description specify project description - -a, --author specify project author (name, email, url) - --license specify project license (MIT) - -p, --private specify visibility of project (true) - -t, --type specify extension type (popup) - --position specify overlay extension position (center) - --override specify page to override (newtab) - --options specify whether to and how render options (embedded) - -p, --packageManager Specify package manager to use (pnpm) - -f, --framework specify framework to use (react) - -l, --language specify language to use (typescript) - -s, --style