yarn-global
A set of useful methods for @yarnpkg
Last updated 21 days ago by rem .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install yarn-global 
SYNC missed versions from official npm registry.

yarn-global

NPM version NPM downloads Build Status

Install

yarn add yarn-global

Usage

const yarnGlobal = require('yarn-global')

yarnGlobal.getDirectory()
//=> /Users/name/.config/yarn/global/node_modules

yarnGlobal.inDirectory(process.cwd())
// Check if a path is a child path of the value of `yarnGlobal.getDirectory()`

yarnGlobal.getDependencies()
// An array of denpendencies installed by `yarn global add`

yarnGlobal.hasDependency('create-react-app')
// Check if you have installed it via `yarn global add`
//=> true

yarnGlobal.hasPackage('minimist')
// Check if `/Users/name/.config/yarn/global/node_modules/minimist` exists
// you may not have installed it by `yarn global add`
//=> true

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT © EGOIST

Current Tags

  • 1.2.0                                ...           latest (21 days ago)

5 Versions

  • 1.2.0                                ...           21 days ago
  • 1.1.0                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (2)
Downloads
Today 81
This Week 611
This Month 611
Last Day 171
Last Week 753
Last Month 3,033
Dependencies (1)
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |