npm
Install locked Node.js dependencies with npm ci.
Install locked Node.js dependencies with npm ci.
The task runs in a node container and keeps node_modules as its output, so it
is skipped when package.json and package-lock.json are unchanged.
includes:
npm:
git: https://github.com/no0dles/hammerkit.git
ref: v1.16.0
path: catalog/npm
tasks:
build:
image: node:24-alpine
deps: [npm:install]
cmds:
- npm run buildTasks
| Task | What it does | Reads | Produces |
|---|---|---|---|
install | Install locked Node.js dependencies with npm ci. | package.json, package-lock.json | node_modules |
Inputs
| Input | Default | Meaning |
|---|---|---|
NODE_VERSION | 24 | Tag of the node image the install runs in, e.g. 22 or 24. The image is node:<NODE_VERSION>-alpine. |
The entry
# Installs the locked dependencies of a Node.js project with npm.
envs:
# tag of the node image the install runs in
NODE_VERSION: 24
tasks:
install:
description: install the locked dependencies with npm ci
image: node:${NODE_VERSION}-alpine
src: [package.json, package-lock.json]
generates: [node_modules]
cmds:
- npm ci