65cbe6189735b88fa3a44543ed8d9fc558814fc4
[yaffs-website] / vendor / consolidation / robo / src / Task / Npm / Install.php
1 <?php
2 namespace Robo\Task\Npm;
3
4 use Robo\Contract\CommandInterface;
5
6 /**
7  * Npm Install
8  *
9  * ``` php
10  * <?php
11  * // simple execution
12  * $this->taskNpmInstall()->run();
13  *
14  * // prefer dist with custom path
15  * $this->taskNpmInstall('path/to/my/npm')
16  *      ->noDev()
17  *      ->run();
18  * ?>
19  * ```
20  */
21 class Install extends Base implements CommandInterface
22 {
23     /**
24      * @var string
25      */
26     protected $action = 'install';
27
28     /**
29      * {@inheritdoc}
30      */
31     public function run()
32     {
33         $this->printTaskInfo('Install Npm packages: {arguments}', ['arguments' => $this->arguments]);
34         return $this->executeCommand($this->getCommand());
35     }
36 }