chrisdrakeford 9c87c1307d first commit | 3 vuotta sitten | |
---|---|---|
.. | ||
index.d.ts | 3 vuotta sitten | |
index.js | 3 vuotta sitten | |
license | 3 vuotta sitten | |
package.json | 3 vuotta sitten | |
readme.md | 3 vuotta sitten |
Check if a project is using Yarn
Useful for tools that needs to know whether to use yarn
or npm
to install dependencies.
It checks if a yarn.lock
file is present in the working directory.
$ npm install has-yarn
.
├── foo
│ └── package.json
└── bar
├── package.json
└── yarn.lock
const hasYarn = require('has-yarn');
hasYarn('foo');
//=> false
hasYarn('bar');
//=> true
Returns a boolean
of whether the project uses Yarn.
Type: string
Default: process.cwd()
Current working directory.
MIT © Sindre Sorhus