CLI
The sku command line interface (CLI) is the primary way to interact with your project. It provides a number of commands to help you develop, test and build your application.
CLI Options
| Option | Description |
|---|---|
--debug, -D | Enable debug logging sku start --debug |
--config, -c | Specify a custom path to your sku config sku build --config path/to/custom/config |
--environment, -e | Specify the environment to use (only valid for start and serve commands) sku start --environment production |
--help, -h | Show help output for the current command sku --help |
--version, -v | Show the version of sku that is currently installed sku --version |
CLI Commands
start
Start the sku development server for a statically-rendered application.
sku startThis command supports the following options:
| Option | Description | Defaults to |
|---|---|---|
--stats, -s | The webpack stats preset used to override the default sku build --stats=errors-only | summary |
--port | The port to serve the dev server on. | |
--strict-port | Will make sku throw an error if the given port is already in use. | false |
--list-urls, -l | Lists all dev server urls the app can be accessed on. If false, only displays the first found host. | false |
start-ssr
Start the sku development server for a server-rendered application.
sku start-ssrThis command supports the following options:
| Option | Description | Defaults to |
|---|---|---|
--stats, -s | The webpack stats preset used to override the default sku build --stats=errors-only | summary |
--list-urls, -l | Lists all dev server urls the app can be accessed on. If false, only displays the first found host. | false |
build
Create a production build of a statically-rendered application.
sku buildThis command supports the following options:
| Option | Description | Defaults to |
|---|---|---|
--stats, -s | The webpack stats preset used to override the default sku build --stats=errors-only | errors-only |
build-ssr
Create a production build of a server-rendered application.
sku build-ssrThis command supports the following options:
| Option | Description | Defaults to |
|---|---|---|
--stats, -s | The webpack stats preset used to override the default sku build --stats=errors-only | errors-only |
serve
Serve a production build of a statically-rendered application from your local machine. Requires sku build to be run first.
sku serveThis command supports the following options:
| Option | Description | Defaults to |
|---|---|---|
--port | The port to serve the application on sku serve --port=8080 | |
--site | The site to serve the application on sku serve --site=seekAnz | |
--list-urls, -l | Lists all dev server urls the app can be accessed on. If false, only displays the first found host. | false |
test
Run unit tests. See the testing documentation for more information.
sku testlint
Run lint tooling over your code. See the linting/formatting documentation for more information.
sku lintformat
Apply all available lint and formatting fixes. See the linting/formatting documentation for more information.
sku formatsetup-hosts
Update your hosts file to point any configured hosts to your local machine.
sudo sku setup-hostsconfigure
Emit and update configuration files for your project. This command is run before most other sku CLI commands, so you shouldn't need to run it manually.
sku configureTranslations
Translation-specific commands. These commands are only useful if your application is configured to be a multi-language application.
translations compile
Compile translations defined in .vocab directories.
sku translations compileThis command supports the following options:
| Option | Description |
|---|---|
--watch, -w | Re-compile translations whenever changes are detected sku translations compile --watch |
translations push
Push translations to Phrase. See the documentation on phrase-specific features for more information.
sku translations pushThis command supports the following options:
| Option | Description |
|---|---|
--auto-translate | Instructs Phrase to automatically translate any missing keys using machine translation. sku translations push --auto-translate |
--delete-unused-keys | Deletes keys that were not referenced in the upload sku translations push --delete-unused-keys |
translations pull
Pull translations from Phrase. See the documentation on phrase-specific features for more information.
sku translations pulltranslations validate
Validate translations defined in .vocab directories.
sku translations validate