4.0.1 • Published 10 months ago

gulp-yarn v4.0.1

Weekly downloads
3,956
License
MIT
Repository
github
Last release
10 months ago

SUPPORT

node-versiongulp-yarn
>= v14v4
>= v10v3
Olderv1

Install

# npm
$ npm install gulp-yarn --save-dev

# yarn
$ yarn add gulp-yarn -D

Usage

BASIC: Better performance when in same directory.

const { src } = require('gulp');
var yarn = require('gulp-yarn');

const yarnTask = function () {
  return src(['./package.json'])
    .pipe(yarn());
};

PRO: Remember to include yarn.lock file.

const { src, dest } = require('gulp');
var yarn = require('gulp-yarn');

const yarnTask = function () {
  return src(['./package.json'])
    .pipe(dest('./dist'))
    .pipe(yarn({
      production: true
    }));
};

Options

OptionDescriptionType
productionUsing the --production flag, or when the NODE_ENV environment variable is set to production, Yarn will not install any package listed in devDependencies.Boolean
devYarn will only install listed devDependencies.Boolean
flatOnly allow one version of a package. On the first run this will prompt you to choose a single version for each package that is depended on at multiple version ranges.Boolean
forceThis refetches all packages, even ones that were previously installed.Boolean
ignoreEnginesIgnore all the required engines force by some packages.Boolean
noBinLinksNone of node_module bin links getting created.Boolean
noProgressDisable progress barBoolean
noLockfileDon't read or generate a lockfileBoolean
ignoreScriptsDon't run npm scripts during installationBoolean
nonInteractiveUsing the '--non-interactive' flag of yarn to avoid that during the resolution (yarn install) a user input is needed. 2770Boolean
argsPass any argument with -- to execute with yarnString/Array

Test

#run jest test
yarn test

Contribute

Contributions are always welcome, no matter how large or small.