Command Line Interface
Every command reports a failure as [inca] <command> failed (<code>): …. See Error Codes for what each code means.
| Command | Description |
|---|---|
inca --help | Lists the commands. |
inca <command> --help | Lists the options of the command. |
inca --version | Prints the version of @incajs/cli. |
An unknown command prints the command list and exits with code 1.
inca dev
Watches your app and opens a development window that applies each edit. Saving a file without changing it does not reload the app. If the app failed to start, save a change to try again. It exits with code 0 when you close the window and non-zero if the host crashes.
When the config or the entry cannot be used before the first build, it prints the error and retries when you save the config or the entry. It stops before building when no host binary can be found.
When no entry is set, it selects the entry again after a src/main file or src/App.vue is created or deleted, and reloads the development window if the selection changed. While no entry exists, it prints the error and keeps the window open until one appears.
Usage
$ inca devinca build
Bundles your app for production, once, with no window opened. See Building for Production.
Usage
$ inca buildOptions
| Flag | Description |
|---|---|
--sourcemap | Writes bundle.js.map beside the bundle. |
--no-sourcemap | Turns the map off when the sourcemap key turns it on. |
When both flags are given, --no-sourcemap wins.
inca package
Builds your app, then packages it with a prebuilt host binary into a distributable application: a .app on macOS, a plain directory on Linux. See Building for Production.
Usage
$ inca packageOptions
| Flag | Description |
|---|---|
--sourcemap | Writes bundle.js.map beside the bundle. |
--no-sourcemap | Turns the map off when the sourcemap key turns it on. |
When both flags are given, --no-sourcemap wins.
inca config
Prints the settings the host applies to your app as JSON. A null marks a value left to the host: the root element sizes the window, and an unset limit stays open. It reads the config as inca build does, builds nothing and opens no window.
A setting whose value the host cannot use fails with ERR_INCA_CONFIG_INVALID, naming the setting, its value and the kind of value it must be.
Usage
$ inca configinca info
Prints the version of Incarnative.js, the host package and the path of the host binary. A line the CLI can't fill gives the reason in parentheses.
Usage
$ inca infoIncarnative.js: 0.0.25
host package: @incajs/host-linux-x64@0.0.25
host binary: /home/user/.cache/incajs/host/linux-x64@0.0.25/inca-hostEnvironment Variables
| Variable | Description |
|---|---|
INCA_HOST_BIN | Path to a specific host binary, used in place of automatic resolution, e.g. on a custom or unpublished build. |
INCA_CACHE_DIR | The directory the CLI unpacks the host binary into. |