sidebar_label | sidebar_position | toc_max_heading_level | description |
---|---|---|---|
Subcommands |
2 |
4 |
See the Snaps CLI subcommands reference. |
import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem";
This reference describes the syntax of the Snaps command line interface (CLI) subcommands and subcommand options.
You can specify subcommands and their options using the yarn mm-snap
command:
yarn mm-snap [SUBCOMMAND] [SUBCOMMAND OPTIONS]
yarn mm-snap build
Builds a Snap from source.
b
is an alias for build
.
yarn mm-snap build --config <FILE>
yarn mm-snap build --config ./snap.config.build.ts
Path to the configuration file.
-c
is an alias for --config
.
yarn mm-snap eval
Attempts to evaluate the Snap bundle in Secure ECMAScript (SES).
e
is an alias for eval
.
yarn mm-snap manifest
Validates the Snap manifest file.
m
is an alias for manifest
.
yarn mm-snap manifest --fix <BOOLEAN>
yarn mm-snap manifest --fix false
Enables or disables making any changes to fix the manifest file.
The default is true
.
yarn mm-snap serve
Locally serves Snap files for testing.
s
is an alias for serve
.
yarn mm-snap serve --port <PORT>
yarn mm-snap serve --port 9000
The local server port for testing.
The default is 8081
.
-p
is an alias for --port
.
yarn mm-snap watch
Rebuilds a Snap from source upon changes.
w
is an alias for watch
.
yarn mm-snap watch --port <PORT>
yarn mm-snap watch --port 9000
The local server port for testing.
The default is 8081
.
-p
is an alias for --port
.
-h, --help
Displays the help message and exits.
You can use this option with mm-snap
or any subcommand.
-h
is an alias for --help
.
--version
Displays the version number and exits.