Check if a project is using Yarn
It checks for a yarn.lock file in the given directory or any of its parent directories (useful for Yarn workspaces).
npm install --global has-yarn-cli
$ has-yarn --help
Usage
$ has-yarn
✔ This project uses Yarn
Options
--quiet Silence output (useful for scripts)
Exits with code 0 if the project uses Yarn, otherwise code 2