yarn-lockfile-exists

1.0.0 • Public • Published

yarn-lockfile-exists

CI Status npm Node.js License

Check for a Yarn lockfile in the current working directory.

Install

yarn add yarn-lockfile-exists # Or alternatively: `npm install yarn-lockfile-exists`

Usage

JavaScript

import yarnLockfileExists from 'yarn-lockfile-exists';

// Returns `true` or `false` based off of if there is a `yarn.lock` file in the location
// that `process.cwd()` points to.
yarnLockfileExists();

// Optionally you can specify the current working directory for the function to operate in.
const cwd = '/home/myself/awesome-project';

yarnLockfileExists({ cwd });

TypeScript

import yarnLockfileExists, { type YarnLockfileExistsConfig } from 'yarn-lockfile-exists';

// Returns `true` or `false` based off of if there is a `yarn.lock` file in the location
// that `process.cwd()` points to.
yarnLockfileExists();

// Optionally you can specify the current working directory for the function to operate in.
const config: YarnLockfileExistsConfig = {
    cwd: '/home/myself/awesome-project'
};

yarnLockfileExists(config);

NOTE: This is a pure ESM package. See here for details.

Testing

yarn test # Or alternatively: `npm test`

License

The MIT License. See the license file for details.

Dependents (1)

Package Sidebar

Install

npm i yarn-lockfile-exists

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

6.42 kB

Total Files

8

Last publish

Collaborators

  • radioactivehamster