lyxaira.glass 74ca844f42 Actualizacion cambios generados: seccion #12, #14 y #15. | 4 年之前 | |
---|---|---|
.. | ||
index.d.ts | 4 年之前 | |
index.js | 4 年之前 | |
license | 4 年之前 | |
package.json | 4 年之前 | |
readme.md | 4 年之前 |
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