← BACK

has-yarn-cli

Check if a project is using Yarn

JavaScript ⭐ 64

has-yarn-cli

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).

Install

npm install --global has-yarn-cli

Usage

$ 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

Related