has-yarn

WebJar for has-yarn

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

has-yarn
Last Version

Last Version

2.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

has-yarn
WebJar for has-yarn
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/has-yarn

Download has-yarn

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/has-yarn/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>has-yarn</artifactId>
    <version>2.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/has-yarn/
implementation 'org.webjars.npm:has-yarn:2.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/has-yarn/
implementation ("org.webjars.npm:has-yarn:2.1.0")
'org.webjars.npm:has-yarn:jar:2.1.0'
<dependency org="org.webjars.npm" name="has-yarn" rev="2.1.0">
  <artifact name="has-yarn" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='has-yarn', version='2.1.0')
)
libraryDependencies += "org.webjars.npm" % "has-yarn" % "2.1.0"
[org.webjars.npm/has-yarn "2.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

has-yarn Build Status

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.

Install

$ npm install has-yarn

Usage

.
├── foo
│   └── package.json
└── bar
    ├── package.json
    └── yarn.lock
const hasYarn = require('has-yarn');

hasYarn('foo');
//=> false

hasYarn('bar');
//=> true

API

hasYarn([cwd])

Returns a boolean of whether the project uses Yarn.

cwd

Type: string
Default: process.cwd()

Current working directory.

Related

License

MIT © Sindre Sorhus

Versions

Version
2.1.0