2021-09-26 15:25:58 +02:00
|
|
|
<!-- DO NOT EDIT THIS FILE! -->
|
|
|
|
<!-- Instead edit contrib/npm.php -->
|
|
|
|
<!-- Then run bin/docgen -->
|
|
|
|
|
2022-07-26 09:18:44 +02:00
|
|
|
# Npm Recipe
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
[Source](/contrib/npm.php)
|
|
|
|
|
|
|
|
|
2021-11-06 19:02:51 +01:00
|
|
|
|
2021-09-26 15:25:58 +02:00
|
|
|
## 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');
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-18 18:29:14 +02:00
|
|
|
## Configuration
|
|
|
|
### bin/npm
|
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L24)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
## Tasks
|
|
|
|
|
|
|
|
### npm:install
|
2022-03-03 21:46:00 +01:00
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L34)
|
2021-09-26 15:25:58 +02:00
|
|
|
|
2021-11-08 22:59:39 +01:00
|
|
|
Installs npm packages.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
2022-01-13 14:35:12 +01:00
|
|
|
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.
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
|