X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fconsolidation%2Frobo%2Fsrc%2FTask%2FBower%2FBase.php;fp=vendor%2Fconsolidation%2Frobo%2Fsrc%2FTask%2FBower%2FBase.php;h=9bc614c6321de88de6d98a1d6d50cb299b685343;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/consolidation/robo/src/Task/Bower/Base.php b/vendor/consolidation/robo/src/Task/Bower/Base.php new file mode 100644 index 000000000..9bc614c63 --- /dev/null +++ b/vendor/consolidation/robo/src/Task/Bower/Base.php @@ -0,0 +1,88 @@ +option('allow-root'); + return $this; + } + + /** + * adds `force-latest` option to bower + * + * @return $this + */ + public function forceLatest() + { + $this->option('force-latest'); + return $this; + } + + /** + * adds `production` option to bower + * + * @return $this + */ + public function noDev() + { + $this->option('production'); + return $this; + } + + /** + * adds `offline` option to bower + * + * @return $this + */ + public function offline() + { + $this->option('offline'); + return $this; + } + + /** + * Base constructor. + * + * @param null|string $pathToBower + * + * @throws \Robo\Exception\TaskException + */ + public function __construct($pathToBower = null) + { + $this->command = $pathToBower; + if (!$this->command) { + $this->command = $this->findExecutable('bower'); + } + if (!$this->command) { + throw new TaskException(__CLASS__, "Bower executable not found."); + } + } + + /** + * @return string + */ + public function getCommand() + { + return "{$this->command} {$this->action}{$this->arguments}"; + } +}