Skip to main content
Version: Next

npm

Available Commands

CommandDescription
dispatchRuns an arbitrary npm command (forwards the Terrabuild action name to npm).
installInstalls packages with npm ci, honoring the lock file.
buildRuns the build script via npm run build.
testRuns the test script via npm run test.
runRuns an arbitrary npm script via npm run <target>.
execExecutes a package binary via npm exec.

Project Initializer

Computes default outputs and dependencies from package.json.

project {
@npm { }
}

Equivalent to:

project {
ignores = [ "node_modules/**" ]
outputs = [ "dist/**" ]
}