Back to Deployer

Npm Recipe

docs/contrib/npm.md

8.0.31.3 KB
Original Source
<!-- DO NOT EDIT THIS FILE! --> <!-- Instead edit contrib/npm.php --> <!-- Then run bin/docgen -->

Npm Recipe

php
require 'contrib/npm.php';

Source

Configuration

  • bin/npm (optional): set npm binary, automatically detected otherwise.

Usage

php
after('deploy:update_code', 'npm:install');
after('npm:install', 'npm:build');

Configuration

bin/npm

Source

Configuration

  • bin/npm (optional): set npm binary, automatically detected otherwise.

Usage

php
after('deploy:update_code', 'npm:install');
after('npm:install', 'npm:build');
php
return which('npm');

Tasks

npm:install {#npm-install}

Source

Installs npm packages.

Uses npm ci command. This command is similar to npm install, except it's meant to be used in automated environments such as test platforms, continuous integration, and deployment -- or any situation where you want to make sure you're doing a clean install of your dependencies.

npm:build {#npm-build}

Source

Runs npm build.