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
|
|
|
|
|
|
|
```php
|
|
|
|
require 'contrib/npm.php';
|
|
|
|
```
|
|
|
|
|
2022-09-12 12:29:44 +02:00
|
|
|
[Source](/contrib/npm.php)
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-09-26 15:25:58 +02:00
|
|
|
## 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
|
2022-09-12 12:29:44 +02:00
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L16)
|
2021-10-18 18:29:14 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-12 12:53:42 +02:00
|
|
|
```php title="Default value"
|
|
|
|
return which('npm');
|
|
|
|
```
|
2021-10-18 18:29:14 +02:00
|
|
|
|
|
|
|
|
2021-09-26 15:25:58 +02:00
|
|
|
|
|
|
|
## Tasks
|
|
|
|
|
|
|
|
### npm:install
|
2022-09-12 12:29:44 +02:00
|
|
|
[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L26)
|
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
|
|
|
|
|
|
|
|