Skip to content

taku-k/gradle-yarn-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gradle Plugin for Yarn 📦🐈

Build Status Coverage Status Gradle Plugin Versin

You can run any Yarn commands in your gradle scripts by using this plugin. This plugin downloads any version of Yarn into your .gradle directory and you can use them from there.

Installation

Releases of this plugin are hosted at Gradle Plugin Portal.

If you use Gradle > 2.1, setup the plugin like this:

plugins {
  id "me.taku_k.yarn" version "0.1.1"
}

Otherwise:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.me.taku_k.gradle.yarn:gradle-yarn-plugin:0.1.1"
  }
}

apply plugin: "me.taku_k.yarn"

yarn Tasks Execution

yarnSetup task

This task downloads a custom version of yarn script from GitHub - Yarn. The directory where the script is saved is under the .gradle/yarn in default setting.

yarnInstall task

This task installs packages that package.json depends on.

yarn Extension Configuration

If you would like to use a specified version of yarn, "yarn" extension block is like this:

yarn {
	version = '0.17.9'
}