Building and packaging an application involves three basic steps:
- Install: install dependencies, run custom build steps, and prune development dependencies. See Installing dependencies.
- Bundle: modify the
.npmignoreconfiguration files so dependencies will be packed. See Bundling dependencies.
- Create deployable package, either:
slc build, you can perform all these steps in a single command, or if you prefer, multiple commands. The documentation describes each step separately, but you can use command options to perform them altogether with a single command.
When using Git, it may be useful to have several different package repositories, for example to manage public and internal releases. See Using multiple package registries for more information.
The slc build command provides shortcut options for the two basic workflows: building an npm archive (
.tgz file) and committing a build to Git.
To create an npm archive (.tgz) file, use this shortcut in your app root directory:
To commit a build to a Git archive, use this shortcut in your app root directory:
By default, this command commits to the "deploy" branch. Use the
--onto option to specify a different branch.