X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fconsolidation%2Frobo%2Fsrc%2FTask%2FNpm%2FBase.php;fp=vendor%2Fconsolidation%2Frobo%2Fsrc%2FTask%2FNpm%2FBase.php;h=35ff9c48f4319ad2d1fe2261cc8e9ccab293fe87;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/consolidation/robo/src/Task/Npm/Base.php b/vendor/consolidation/robo/src/Task/Npm/Base.php new file mode 100644 index 000000000..35ff9c48f --- /dev/null +++ b/vendor/consolidation/robo/src/Task/Npm/Base.php @@ -0,0 +1,60 @@ +option('production'); + return $this; + } + + /** + * @param null|string $pathToNpm + * + * @throws \Robo\Exception\TaskException + */ + public function __construct($pathToNpm = null) + { + $this->command = $pathToNpm; + if (!$this->command) { + $this->command = $this->findExecutable('npm'); + } + if (!$this->command) { + throw new TaskException(__CLASS__, "Npm executable not found."); + } + } + + /** + * @return string + */ + public function getCommand() + { + return "{$this->command} {$this->action}{$this->arguments}"; + } +}