JSPM

@roots/dependencies

2025.1.23-8
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 263
  • Score
    100M100P100Q83708F
  • License MIT

Automated package installation

Package Exports

  • @roots/dependencies

Readme

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.

Carrot WordPress.com Worksite Safety Itineris