1.0.0 • Published 1 year ago

yarn-lockfile-exists v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
1 year ago

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.

1.0.0

1 year ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago