CLI

wvb pack

Pack a directory of built web assets into a single compressed, integrity-checked .wvb archive.

wvb pack packs a directory of built web assets (HTML, JS, CSS, media) into a single .wvb archive. The archive is compressed and checksummed. It is the unit your app ships and serves to its webview, or uploads to a remote for over-the-air (OTA) updates.

Most projects run wvb pack with no arguments. The source directory, output path, and other defaults come from the wvb.config file discovered in the working directory.

Usage

wvb pack [SRC_DIR]

Pack the default source directory, then pack an explicit directory to a chosen output path:

wvb pack                                          # uses config defaults
wvb pack ./dist
wvb pack ./dist --outfile ./build/app.wvb

Exclude files with repeatable --ignore globs:

wvb pack ./dist --ignore '*.map' --ignore 'node_modules/**'

Attach response headers to matching files with --header, which takes three values per use:

wvb pack ./dist --header '*.html' 'cache-control' 'max-age=3600'

Do a dry run that reports what would be packed without writing the archive:

wvb pack ./dist --no-write

Options

OptionAliasesDefaultDescription
SRC_DIRpack.srcDir ?? ./distSource directory to pack.
--outfile--out-file, -O.wvb/<package name>Output path. .wvb is appended if missing.
--ignoreGlob of files to exclude. Repeatable.
--header-HSet headers on matching files: --header <glob> <key> <value>. Repeatable.
--no-writewrites by defaultRun the pack without writing the archive (dry run).
--overwritetrueOverwrite an existing output file.

These flags also accept the common per-command --config (-C) and --cwd options. See the CLI overview for how config discovery and global flags work.

pack has no --outdir flag. The output directory is determined by --outfile; the default resolves to .wvb/<package name>, where the name comes from the nearest package.json with its scope stripped.

Boolean flags accept --flag, --flag=true|false, and a --no-flag negation. For example, --no-write turns off the default --write behavior, and --no-overwrite keeps an existing output file in place.

Configuration

Set pack defaults in your wvb.config file so the command runs cleanly with no arguments. The config field for the output path is outFile (a single path; .wvb is appended automatically), and overwrite defaults to true. A flag passed on the command line always wins over the config value.

On this page