{"name":"yarn-install","version":"0.4.1","description":"Install dependencies using Yarn with npm fallback.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/egoist/yarn-install.git"},"author":{"name":"EGOIST","email":"0x142857@gmail.com","url":"github.com/egoist"},"engines":{"node":">=4"},"scripts":{"test":"jest -i && npm run lint","lint":"xo"},"files":["index.js","bin"],"bin":{"yarn-install":"bin/yarn-install.js","yarn-remove":"bin/yarn-remove.js"},"keywords":["yarn","install"],"devDependencies":{"eslint-config-rem":"^3.1.0","execa":"^0.5.0","jest-cli":"^15.1.1","require-uncached":"^1.0.3","xo":"^0.18.2"},"jest":{"testEnvironment":"node"},"xo":{"extends":"rem","envs":["jest"],"rules":{"no-unused-expressions":0}},"dependencies":{"cac":"^3.0.3","chalk":"^1.1.3","cross-spawn":"^4.0.2"},"gitHead":"d1108c8ba63b7cb1fde21fbd1047dfaf189324cf","bugs":{"url":"https://github.com/egoist/yarn-install/issues"},"homepage":"https://github.com/egoist/yarn-install#readme","_id":"yarn-install@0.4.1","_npmVersion":"5.3.0","_nodeVersion":"7.6.0","_npmUser":{"name":"rem","email":"0x142857@gmail.com"},"dist":{"integrity":"sha512-O4uHtK+syh08wO6DWSFd/VaTCej7DKuzFb0iq57TsycSb0AJfJIIE7AU+FBNLlWrHhJIf+BqPkXlhGCn4xuP0A==","shasum":"813d1a9dc7c7c1ead24b60a07f692d6f72cfafdf","tarball":"http://registry-npm.ywwl.com/yarn-install/download/yarn-install-0.4.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIARCRmSfHHSSB+vUTPkApNOCEyJhgN8gOEg31kzcFTj9AiBmFb94c3jnI6sl39M1CSNVeugYiJVOh1tyopNTNxQGVw=="}],"size":3607,"noattachment":false,"key":"/yarn-install/-/yarn-install-0.4.1.tgz"},"maintainers":[{"name":"rem","email":"0x142857@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yarn-install-0.4.1.tgz_1500804154145_0.4306663400493562"},"directories":{},"readme":"# yarn-install [![NPM version](https://img.shields.io/npm/v/yarn-install.svg?style=flat-square)](https://npmjs.com/package/yarn-install) [![NPM downloads](https://img.shields.io/npm/dm/yarn-install.svg?style=flat-square)](https://npmjs.com/package/yarn-install) [![Build Status](https://img.shields.io/circleci/project/egoist/yarn-install/master.svg?style=flat-square)](https://circleci.com/gh/egoist/yarn-install)\n\nIf command `yarn` exists it uses Yarn to install, otherwise fallbacks to npm.\n\n## Install\n\n```bash\n$ npm install --save yarn-install\n```\n\n## Usage\n\n```js\nconst install = require('yarn-install')\n\nconst result = install({\n  deps: ['webpack', 'mocha']\n})\n//=> result, returned by child_process.spawnSync\n```\n\n## CLI\n\n```bash\nyarn global add yarn-install\n\n# then you will have `yarn-install` & `yarn-remove` commands\nyarn-install pokemon --dev\nyarn-install yo --global\nyarn-remove xo\n# don't forget that `yarn-install` with dependencies is always `--save` by default.\n\nyarn-install help\nyarn-remove help\n```\n\n## API\n\n### install([options])\n\n#### options\n\n##### deps\n\nType: `array`\n\nAn array of dependencies to install, you can omit it to install dependencies in `package.json`. If `dependencies` is present, it defaults to `--save` mode.\n\n```js\ninstall({\n  deps: ['ava', 'koa']\n})\n```\n\n##### cwd\n\nType: `string`\n\nThe directory to run the command.\n\n##### registry\n\nType: `string`  \n\nSpecfic a custom npm registry to use.\n\n##### dev\n\nType: `boolean`\n\nUse `--dev` for Yarn and `--save-dev` for npm.\n\n##### global\n\nType: `boolean`\n\nInstall globally, stands for `npm --global` or `yarn global`.\n\n##### remove\n\nType: `boolean`<br>\nDefault: `undefined`\n\nThe reversed behavior to `install`, ie. `yarn remove` and `npm uninstall`\n\n##### production\n\nType: `boolean`<br>\nDefault: `undefined`\n\nOnly install `dependencies` in `package.json`.\n\n##### respectNpm5\n\nType: `boolean`<br>\nDefault: `undefined`\n\nUse npm if it's >= npm5.\n\n### install.getPm([options])\n\nGet the package manager that will be used to install.\n\n#### options\n\n##### respectNpm5\n\n```js\n// Given you have yarn & npm 4 installed\nconst pm = install.getPm()\n//=> yarn\n\n// Given you have yarn & npm 5 installed\nconst pm = install.getPm()\n//=> yarn\n\n// Given you have yarn & npm 5 installed\nconst pm = install.getPm({ respectNpm5: true })\n//=> npm\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## License\n\n[MIT](https://egoist.mit-license.org/) © [EGOIST](https://github.com/egoist)\n","publish_time":1500804154699,"_cnpm_publish_time":1500804154699,"dist-tags":{"latest":"1.0.0"}}