@roots/dependencies
TypeScript icon, indicating that this package has built-in type declarations

6.23.3 • Public • Published

bud.js

MIT License npm Follow Roots

@roots/dependencies

Automated package installation


Installation

Install @roots/dependencies to your project.

Yarn:

yarn add @roots/dependencies --dev

npm:

npm install @roots/dependencies --save-dev

Usage

Import the Dependencies manager and instantiate.

The base path is required.

import { Dependencies } from "@roots/dependencies";

const manager = new Dependencies(process.cwd());

Optionally, you may also provide handlers for messages and errors:

import { Dependencies } from "@roots/dependencies";
const manager = new Dependencies(process.cwd(), console.log, console.error);

Create and use a new client:

const client = await manager.getClient();

await this.client.install(`lodash`);
await this.client.uninstall(`lodash`);

Get the latest version of a package:

const version = await this.client.getLatestVersion(`lodash`);

install a specific version with an array or a formatted string ({signifier}@{version}):

await this.client.install([`lodash`, `latest`]);
await this.client.install(`lodash@latest`);

Supports flags:

await this.client.install([`lodash`, `latest`], `--dev`);

Contributing

Contributions are welcome from everyone.

We have contribution guidelines to help you get started.

License

@roots/dependencies is licensed under MIT.

Community

Keep track of development and community news.

Sponsors

bud.js is an open source project and completely free to use.

However, the amount of effort needed to maintain and develop new features and projects within the Roots ecosystem is not sustainable without proper financial backing. If you have the capability, please consider sponsoring Roots.

KM Digital Carrot WordPress.com Worksite Safety Itineris

Readme

Keywords

Package Sidebar

Install

npm i @roots/dependencies

Homepage

roots.io/bud

Weekly Downloads

632

Version

6.23.3

License

MIT

Unpacked Size

21.3 kB

Total Files

22

Last publish

Collaborators

  • qwp6t
  • swalkinshaw
  • retlehs
  • log1x
  • kellymears