Snaps command line options
b, bundle
- Syntax
 - Example
 - Configuration file
 
--bundle <file>
-b out/bundle.js
bundle: 'out/bundle.js' 
Path to the snap bundle file.
The default is dist/bundle.js.
You can use this option with the eval subcommand.
-b is an alias for --bundle.
d, dist
- Syntax
 - Example
 - Configuration file
 
--dist <directory>
-d out
dist: 'out'
Path to the output directory.
The default is dist.
You can use this option with the build and
watch subcommands.
-d is an alias for --dist.
depsToTranspile
- Syntax
 - Example
 - Configuration file
 
--depsToTranspile <array>
--depsToTranspile dep1,dep2
depsToTranspile: ['dep1','dep2']
List of dependencies to transpile, if --transpilationMode is set to
localAndDeps.
You can use this option with the build and
watch subcommands.
e, eval
- Syntax
 - Example
 - Configuration file
 
--eval <boolean>
-e false
eval: false
Indicates whether to attempt to evaluate the snap bundle in SES.
The default is true.
You can use this option with the build and
watch subcommands.
-e is an alias for --eval.
fix, writeManifest
- Syntax
 - Example
 - Configuration file
 
--fix <boolean>
--fix false
fix: false
When validating the snap manifest file using the
manifest subcommand, indicates whether to make necessary changes to
the manifest file.
The default is true.
--fix is an alias for --writeManifest.
h, help
-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.
m, manifest
- Syntax
 - Example
 - Configuration file
 
--manifest <boolean>
-m false
manifest: false
Indicates whether to validate the snap manifest file.
The default is true.
You can use this option with the build and
watch subcommands.
-m is an alias for --manifest.
n, outfileName
- Syntax
 - Example
 - Configuration file
 
--outfileName <string>
-n snap.js
outfileName: 'snap.js'
Output file name when building a snap from source.
The default is bundle.js.
You can use this option with the build and
watch subcommands.
-n is an alias for --outfileName.
p, port
- Syntax
 - Example
 - Configuration file
 
--port <number>
-p 9000
port: 9000
Local server port for testing.
The default is 8081.
You can use this option with the serve and
watch subcommands.
-p is an alias for --port.
r, root
- Syntax
 - Example
 - Configuration file
 
--root <directory>
-r out
root: 'out'
Server root directory.
The default is the current working directory (.).
You can use this option with the serve and
watch subcommands.
-r is an alias for --root.
s, src
- Syntax
 - Example
 - Configuration file
 
--src <file>
-s lib/index.js
src: 'lib/index.js'
Path to the snap source file.
The default is src/index.js.
You can use this option with the build and
watch subcommands.
-s is an alias for --src.
sourceMaps
- Syntax
 - Example
 - Configuration file
 
--sourceMaps <boolean>
--sourceMaps true
sourceMaps: true
Indicates whether builds should include source maps.
The default is false.
You can use this option with the build and
watch subcommands.
strip, stripComments
- Syntax
 - Example
 - Configuration file
 
--strip <boolean>
--strip false
strip: false
Indicates whether to remove code comments from the build output.
The default is true.
You can use this option with the build and
watch subcommands.
--strip is an alias for --stripComments.
suppressWarnings
- Syntax
 - Example
 - Configuration file
 
--suppressWarnings <boolean>
--suppressWarnings true
suppressWarnings: true
Indicates whether to suppress warnings.
The default is false.
You can use this option with any subcommand.
transpilationMode
- Syntax
 - Example
 - Configuration file
 
--transpilationMode <string>
--transpilationMode localAndDeps
transpilationMode: 'localAndDeps'
Babel transpilation mode.
Specify localAndDeps to transpile all source code including dependencies, localOnly to transpile
local source code only, and none to transpile nothing.
The default is localOnly.
You can use this option with the build and
watch subcommands.
For TypeScript snaps, --transpilationMode must be set to either localOnly or localAndDeps.
verboseErrors
- Syntax
 - Example
 - Configuration file
 
--verboseErrors <boolean>
--verboseErrors false
verboseErrors: false
Indicates whether to display original errors.
The default is true.
You can use this option with any subcommand.
version
--version
Displays the version number and exits.