sweetchuck/robo-yarn

Robo task wrappers for Yarn commands

Installs: 103 452

Dependents: 2

Suggesters: 0

Security: 0

Stars: 1

Watchers: 4

Forks: 1

Open Issues: 2

Type:robo-tasks

v0.2.3 2020-03-16 18:50 UTC

README

CircleCI codecov

Supported commands

  • yarn --version
  • yarn install
  • detect the configured NodeJS version from
    • yarn.lock
    • package-lock.json
    • .nvmrc

Example

<?php

use Sweetchuck\Robo\Yarn\YarnTaskLoader;
use Robo\Contract\TaskInterface;
use Robo\Tasks;

class RoboFile extends Tasks
{
    use YarnTaskLoader;

    public function yarnVersion(string $dir): TaskInterface
    {
        return $this->taskYarnVersion([
            'workingDirectory' => $dir,
        ]);
    }

    public function yarnInstall(string $dir): TaskInterface
    {
        return $this->taskYarnInstall([
            'workingDirectory' => $dir,
        ]);
    }
}