Building with slc
slc build --install command automates the common work flow for building application dependencies, specifically:
npm install --ignore-scripts: Install Node dependencies without running scripts to build binary add-ons.
To run scripts, use the
--scriptsoption. See Building binary add-ons below for more information.
npm run build: Specify custom build steps such as
bowerin the package's
scripts.buildproperty, since front-end code served by Node commonly requires some amount of preparation.
npm prune --production: Remove development-only tools (such as Bower or Grunt) that the package's build scripts may require, but that should not be deployed.
It runs compilation and install scripts on the deployment server using:
npm rebuild: Compile add-ons for current system.
npm install: Run any install scripts (not typical, but if they exist they may be required to prepare the application for running).
Building binary add-ons
If you're building an app on exactly the same system architecture as the deploy target, you can compile and package binary add-ons. To do this, use this command to build:
Doing this avoids having to to use a compiler on the deployment system, and is recommended when possible.
Listing application dependencies
slc ctl npmls command to display all of the dependencies of an application under management by Process Manager. Since the dependency tree may be very large, provide an integer argument to limit the depth of the display to that number of levels; for example:
See slc ctl command reference for more details.
The result (for express-example-app) is: