CLI
The @modbros/dashboard-cli creates, runs and publishes widget
packs. Install it globally using npm:
npm install --global @modbros/dashboard-cli
List all commands with dashboard-cli --help, and the options of a command with dashboard-cli [command] --help.
Commands
All commands except generate operate on the widget pack in the current directory.
| Command | Description |
|---|---|
generate <name> | Creates a new widget pack project named <name> from the skeleton. |
dev | Registers the widget pack with the local MoBro and rebuilds it on every change, see Run and Test Locally. |
bundle | Bundles the widget pack into dist/<name>_<version>.zip without publishing it. |
publish | Bundles the widget pack and publishes it as a new version, see Publish and Install. |
publish --update | Replaces the content of an already published version. |
publish --unpublish-only | Removes the widget pack from the marketplace, so users can no longer find and install it. |
publish --publish-only | Publishes a previously unpublished widget pack again, without uploading a new version. |
versions | Lists all versions of the widget pack in the marketplace. |
delete-version --version <version> | Deletes a version of the widget pack from the marketplace. |
update-info | Updates the listing information from the mobro-widget-pack-config.json. |
update-logo | Updates the logo from the logo.svg or logo.png file. |
update-storepage | Updates the store page from the storepage.md file. |
update | Updates the project files, scripts and dependencies to the latest skeleton. |
update overwrites filesThe update command replaces all project files except the src/ directory, README.md,
mobro-widget-pack-config.json and package.json with the files of the latest skeleton. In the package.json, it
replaces the scripts, dependencies and devDependencies. Commit your changes before running it, and review the
result afterwards.
Options
| Option | Commands | Description |
|---|---|---|
-wd, --working-directory <path> | all | Runs the command for the widget pack in the given directory instead of the current one. |
-ak, --api-key <key> | all marketplace commands | The marketplace API key. |
-u, --url <url> | all marketplace commands | The marketplace URL. Only needed for testing against a different marketplace. |
Environment Variables
Instead of passing options, marketplace commands read the following variables from the environment or a .env file in
the current directory:
| Variable | Replaces |
|---|---|
MODBROS_MARKETPLACE_API_KEY | --api-key |
MODBROS_MARKETPLACE_URL | --url |