【文件属性】:
文件名称:has-yarn:检查项目是否正在使用Yarn
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-26 07:51:53
JavaScript
有纱
检查项目是否正在使用
对于需要知道是使用yarn还是npm来安装依赖项的工具很有用。
它检查工作目录中是否存在yarn.lock文件。
安装
$ npm install has-yarn
用法
.
├── foo
│ └── package.json
└── bar
├── package.json
└── yarn.lock
const hasYarn = require ( 'has-yarn' ) ;
hasYarn ( 'foo' ) ;
//=> false
hasYarn ( 'bar' ) ;
//=> true
原料药
hasYarn([cwd])
返回项目是否使用Yarn的boolean 。
随身碟
类型: string 默认值: process.cwd()
当前工作目录。
有关的
此模块的CLI
执照
麻省理工学院:copyright:
【文件预览】:
has-yarn-main
----.gitignore(23B)
----package.json(599B)
----.npmrc(19B)
----index.js(268B)
----test.js(164B)
----.github()
--------workflows()
--------funding.yml(91B)
----license(1KB)
----readme.md(842B)
----index.test-d.ts(133B)
----.gitattributes(19B)
----fixtures()
--------foo()
--------bar()
----.editorconfig(175B)
----index.d.ts(448B)