2017 © Pedro Peláez
 

library robo-yarn

Template to create a new Robo task.

image

sweetchuck/robo-yarn

Template to create a new Robo task.

  • Sunday, April 8, 2018
  • by Sweetchuck
  • Repository
  • 2 Watchers
  • 0 Stars
  • 83 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

Robo task wrapper for Yarn

CircleCI codecov, (*1)

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,
        ]);
    }
}

The Versions