Nocturnal Programmer's Machine
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

package-add

1.1.5 • Public • Published

package-add

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

install(pkgstring | string[], optionsOptions) => Promise<SpawnSyncReturns<Buffer>>
 
type Options = {
  registry?: string;
  save?: Save;
  ignoreWorkspaceRootCheck?: boolean;
}
import install from "package-add";
 
install(["react", "react-dom"]);
 
// Equivalent of:
// yarn add react react-dom
// npm install react react-dom
// pnpm add react react-dom

Keywords

none

Install

npm i package-add

DownloadsWeekly Downloads

19

Version

1.1.5

License

MIT

Unpacked Size

5.42 kB

Total Files

6

Last publish

Collaborators

  • avatar