yarn-api
Basic API for yarn.
Install
Install with npm:
$ npm install --save yarn-api
Install with yarn:
$ yarn add yarn-api
Usage
var yarn = ; ;
API
yarn
Run yarn
with the given cmds
, args
and callback.
Params
cmds
{String|Array}args
{String|Array}cb
{Function}: Callback
Example
;
.link
.link
Symlink the current project to global node_modules
. Visit the yarn docs for link.
Params
cb
{Function}: Callback
Example
yarnlink { if err throw err;};
.unlink
.unlink
Unlink a previously created symlink for a package. Visit the yarn docs for unlink.
Params
cb
{Function}: Callback
Example
yarn;
.add
.add
Installs one or more packages and any packages they depend on.
Visit the yarn docs for add.
Params
names
{String|Array}: package namescb
{Function}: Callback
Example
yarn;
.global
.global
Execute yarn add --global
with one or more package names
.
Params
names
{String|Array}: One or more package names to installcb
{Function}: Callback
Example
yarn;
.install
.install
Install all dependencies for a project. This is most commonly used when you have just checked out code for a project, or when another developer on the project has added a new dependency that you need to pick up.
Visit the yarn docs for install.
Params
cb
{Function}: Callback
Example
yarn;
.outdated
.outdated
Checks for outdated package dependencies.
Visit the yarn docs for outdated
Params
names
{String|Array}: package namescb
{Function}: Callback
Example
yarn;
.upgrade
.upgrade
Updates all dependencies to their latest version based on the version range specified in the package.json file. The yarn.lock
file will be (re)created as well.
Visit the yarn docs for upgrade.
Params
cb
{Function}: Callback
Example
yarn;
.remove
.remove
Remove a package from your direct dependencies, updating your package.json and yarn.lock files in the process.
Visit the yarn docs for remove.
Params
args
{Function}cb
{Function}: Callback
Example
yarn;
.why
.why
Show information about why a package is installed.
Visit the yarn docs for why.
Params
args
{Function}cb
{Function}: Callback
Example
yarn;
.dependencies
.dependencies
Execute yarn add
with one or more package names
. Updates dependencies
in package.json.
Params
names
{String|Array}: One or more package names to installcb
{Function}: Callback
Example
yarn;
.devDependencies
.devDependencies
Execute yarn add --dev
with one or more package names
. Updates devDependencies
in package.json.
Params
names
{String|Array}: One or more package names to installcb
{Function}: Callback
Example
// defined as a stringyarn; // or as an arrayyarn;
.peerDependencies
.peerDependencies
Execute yarn add --peer
with one or more package names
. Updates peerDependencies
in package.json.
Params
names
{String|Array}: One or more package names to installcb
{Function}: Callback
Example
yarn;
.optionalDependencies
.optionalDependencies
Execute yarn add --optional
with one or more package names
. Updates optionalDependencies
in package.json.
Params
names
{String|Array}: One or more package names to installcb
{Function}: Callback
Example
yarn;
About
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
Building docs
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Author
Jon Schlinkert
License
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on April 27, 2017.