2.0.3 • Published 1 year ago

package-add v2.0.3

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

If I should maintain this repo, please ⭐️

DM me on Twitter if you have questions or suggestions.


Programmatically install packages. Supports yarn, npm, and pnpm.

Usage

The package manager will be automatically detected:

import install from "package-add";

install("react");

// Equivalent to:
// yarn add react
// npm install react
// pnpm add react

You can also install multiple packages at once:

import install from "package-add";

install(["react", "react-dom"]);

// Equivalent to:
// yarn add react react-dom
// npm install react react-dom
// pnpm add react react-dom

Several options are available as well:

import install from "package-add";

install("lerna", {
  registry: "https://registry.npmjs.org",
  save: "dev",
  ignoreWorkspaceRootCheck: true
});

// Equivalent to:
// yarn add lerna --registry https://registry.npmjs.org --dev --ignore-workspace-root-check
// npm install lerna --registry https://registry.npmjs.org --save-dev --ignore-workspace-root-check
// pnpm add lerna --registry https://registry.npmjs.org --save-dev --ignore-workspace-root-check
  • autorepo: Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.

MIT

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago