Skip to content

tristanMatthias/yarn-programmatic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yarn Programmatic API

yarn-programmatic is a library that allows you to access yarn commands programmatically from Javascript.

This is still being developed to map the full feature set of Yarn. Please submit a request on Github if there is a particular command you'd like

Usage

Every function returns a Promise.


yarn.add()

yarn.add(['babel', 'react'], {dev: true});

Arguments

name type value
packages Array List of packages to install
options Object Options object (see below)

Options

name type default value
dev Boolean false Save to devDependencies

yarn.remove()

yarn.remove(['babel', 'react']);

Arguments

name type value
packages Array List of packages to remove

yarn.info()

yarn.info(); // Get info on current package
yarn.info('react'); // Get info on 'react' package

Arguments

name type value
package string Optional package to lookup info for

About

Programmatic API wrapper for Yarn

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors