UNPKG
has-yarn
Version:
latest (4.0.0)
4.0.0
3.0.0
2.1.0
2.0.0
1.0.0
Check if a project is using Yarn
github.com/sindresorhus/has-yarn
sindresorhus/has-yarn
has-yarn
/
index.js
8 lines
(6 loc)
•
205 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
process
from
'node:process'
;
import
path
from
'node:path'
;
import
fs
from
'node:fs'
;
export
default
function
hasYarn
(
cwd = process.cwd()
) {
return
fs.
existsSync
(path.
resolve
(cwd,
'yarn.lock'
)); }