mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 17:22:41 +01:00
51 lines
800 B
Markdown
51 lines
800 B
Markdown
|
<!-- DO NOT EDIT THIS FILE! -->
|
||
|
<!-- Instead edit contrib/npm.php -->
|
||
|
<!-- Then run bin/docgen -->
|
||
|
|
||
|
# npm
|
||
|
|
||
|
[Source](/contrib/npm.php)
|
||
|
|
||
|
|
||
|
## Installing
|
||
|
|
||
|
Add to your _deploy.php_
|
||
|
|
||
|
~~~php
|
||
|
require 'contrib/npm.php';
|
||
|
~~~
|
||
|
|
||
|
## Configuration
|
||
|
|
||
|
- `bin/npm` *(optional)*: set npm binary, automatically detected otherwise.
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
~~~php
|
||
|
after('deploy:update_code', 'npm:install');
|
||
|
~~~
|
||
|
|
||
|
or if you want use `npm ci` command
|
||
|
~~~php
|
||
|
after('deploy:update_code', 'npm:ci');
|
||
|
~~~
|
||
|
|
||
|
|
||
|
|
||
|
* Tasks
|
||
|
* [`npm:install`](#npminstall) — Install npm packages
|
||
|
* [`npm:ci`](#npmci) — Install npm packages with a clean slate
|
||
|
|
||
|
|
||
|
## Tasks
|
||
|
### npm:install
|
||
|
[Source](/contrib/npm.php#L35)
|
||
|
|
||
|
In there is a {{previous_release}}, node_modules will be copied from it before installing deps.
|
||
|
|
||
|
### npm:ci
|
||
|
[Source](/contrib/npm.php#L51)
|
||
|
|
||
|
|
||
|
|