包详细信息

gulp-yarn

warapitiya8.1kMIT4.0.1

Automatically install node modules using Yarn.

gulpplugin, yarn, yarnpkg, gulp

自述文件

Gulp-Yarn

Automatically install node modules using Yarn.

Because we emoji=heart Yarn!

Travis Status Coverage Status npm version npm downloads eslint


SUPPORT

node-version gulp-yarn
>= v14 v4
>= v10 v3
Older v1

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

Option Description Type
production Using the --production flag, or when the NODE_ENV environment variable is set to production, Yarn will not install any package listed in devDependencies. Boolean
dev Yarn will only install listed devDependencies. Boolean
flat Only 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
force This refetches all packages, even ones that were previously installed. Boolean
ignoreEngines Ignore all the required engines force by some packages. Boolean
noBinLinks None of node_module bin links getting created. Boolean
noProgress Disable progress bar Boolean
noLockfile Don't read or generate a lockfile Boolean
ignoreScripts Don't run npm scripts during installation Boolean
nonInteractive Using the '--non-interactive' flag of yarn to avoid that during the resolution (yarn install) a user input is needed. 2770 Boolean
args Pass any argument with -- to execute with yarn String/Array

Test

#run jest test
yarn test

Contribute

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

更新日志

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

4.0.1 (2023-07-18)

Bug Fixes

4.0.0 (2022-10-23)

Features

Bug Fixes

  • default export to support commonjs (dc4fcb6)

3.0.0 (2021-03-03)

Features

  • support modern javascript (edfb964)

Bug Fixes

  • core: Allow Windows paths containing a white-space (8e1d221)
  • core: fix calling yarn install for each file. only works for package.json files (c7227bf)

2.0.0 (2018-05-11)

  • Replace deprecated gulp-util with plugin-error (6052f9d)
  • v2.0.0 (8b58f14)
  • v2.0.0-beta.3 (c93a597)
  • chore(package): update mocha to version 5.0.0 (8a78eba)
  • chore(package): update xo to version 0.20.0 (ea1a17d)
  • fix(core): Allow Windows paths containing a white-space (8e1d221)
  • fix(core): fix calling yarn install for each file. only works for package.json files (c7227bf)
  • docs(changelog): update changelog (38f1901)
  • docs(changelog): update changelog (015c4c0)

2.0.0-beta.2 (2017-12-15)

  • v2.0.0-beta.2 (b44c493)
  • chore(dependency): update dependency (2a5dec0)
  • fix(core): add shell option to spawn function (4ef7686)
  • docs(chaneglog): update changelog (345b4b4)

2.0.0-beta.1 (2017-10-23)

  • test(tests): fix test cases to support ES2015 (19dde57)
  • feat(core): remove src and lib folders and work with index.js root file (cbbfe92)
  • feat(core): simplified the code base and fix bugs (dd74514)
  • build(gulp): add gulp support with babel (499fa93)
  • fix(core): fix issues with async behavior (4849558)
  • ✨ Adding typings (9b93268)
  • v2.0.0-beta.1 (afd4a0a)
  • chore(package): update coveralls to version 3.0.0 (7907a4c)
  • chore(package): update mocha to version 4.0.0 (4dd11f3)

1.0.1 (2017-09-19)

  • 🐛 Fixing async lifecycle (78ee95a)
  • 🔧 Adding editor config (6b0d93b)
  • v1.0.1 (264bca7)
  • refactor(dependency): Update dependencies (656d5f0)

1.0.0 (2017-06-02)

  • Adding yarn non-interaction command to avoid the resolution of versions (when for example buildserve (45f434b)
  • adjust documentation -> Adding yarn non-interaction command to avoid the resolution of versions (whe (2127eb1)
  • v1.0.0 (f1f452f)
  • chore(Changelog): Add changelog support locally (70d02dc)
  • chore(package): update xo to version 0.18.0 (9df4bd6)
  • chore(package): update xo to version 0.19.0 (559c7b3)
  • chore(Readme): change to packages and readme.md files (38e65ae)
  • docs: add updated changelog (acd499b)

1.0.0-alpha.2 (2017-03-15)

  • 1.0.0-alpha.2 (6a535a9)
  • test: add branch test case (54a0b58)
  • test: add more test cases (1e5f77d)
  • fix: babel module.export issue with babel-plugin-add-module-exports (d235360)
  • fix: valid commands boolean values (63f2f12)
  • docs: add CHANGELOG (4d680f4)
  • feat: add support for args property (88c4892)
  • style: run lint for commandRunner (fce6d07)

1.0.0-alpha.1 (2017-03-14)

  • 1.0.0-alpha.1 (ff7a9f7)
  • Update README.md (e34a67d)
  • fix: add indexOf instead of includes (6459bf1)
  • fix: fix coveralls push (8f6f5a8)
  • fix: fix coveralls push (57046de)
  • fix: fix test script (c3f8ee8)
  • fix: removing support from node '0.10' and '0.11' (e94202d)
  • test: add more test cases (1fc87ae)
  • refactor: migrate codebase to ES6 (1dcb9cb)
  • docs(readme): add Greenkeeper badge (83257c0)

0.1.1 (2017-02-22)

  • 0.1.1 (e0114ed)
  • docs(readme): add ignoreScripts (2882499)
  • feat(commands): add ignore-scripts option (0827b84)

0.1.0 (2017-02-07)

0.0.4 (2016-11-23)

  • add --no-bin-links and --ignore-engines options (53d5507)
  • v0.0.4 (17abda4)

0.0.3 (2016-10-23)

0.0.2 (2016-10-23)