{"name":"yarn-install","version":"0.1.0","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 && eslint *.js __test__/*.js"},"files":["index.js"],"keywords":[],"devDependencies":{"eslint":"latest","eslint-config-egoist":"latest","execa":"^0.5.0","jest-cli":"^15.1.1","update-pkg":"^1.0.1"},"jest":{"testEnvironment":"node"},"eslintConfig":{"extends":"egoist/esnext","env":{"jest":true}},"dependencies":{"cross-spawn":"^4.0.2"},"gitHead":"23664225e7f1f0381bd2a7d8b465e2e6257f0426","bugs":{"url":"https://github.com/egoist/yarn-install/issues"},"homepage":"https://github.com/egoist/yarn-install#readme","_id":"yarn-install@0.1.0","_shasum":"86ada0efba75d0c2faa847818d6117010d34ba75","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.4.0","_npmUser":{"name":"rem","email":"0x142857@gmail.com"},"dist":{"shasum":"86ada0efba75d0c2faa847818d6117010d34ba75","tarball":"http://registry-npm.ywwl.com/yarn-install/download/yarn-install-0.1.0.tgz","integrity":"sha512-FuBgm1RU3Vb+jpI2IB13RHtB8RQ8EH8T2VDf4y1oE65fLzzQ2D6R60/xErkpWfqz8OzBbs6CtXLWEsQIa/PU4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFT5I/OjC+sKs4UZaMMs+DsMYTxe84RF0Gptrq9qO+HnAiEAg2e0TwCAvBB+ieiJsaAKxbvtBPdG7O9rKwCqqmzeKs0="}],"size":2583,"noattachment":false,"key":"/yarn-install/-/yarn-install-0.1.0.tgz"},"maintainers":[{"name":"rem","email":"0x142857@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/yarn-install-0.1.0.tgz_1477661388108_0.87924825376831"},"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":1477661388365,"_cnpm_publish_time":1477661388365,"dist-tags":{"latest":"1.0.0"}}