JSPM

@roots/dependencies

6.7.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 263
  • Score
    100M100P100Q83728F
  • 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

Help support our open-source development efforts by becoming a patron.

KM Digital Carrot WordPress.com Pantheon Worksite Safety