@fesk/module-install

1.2.1 • Public • Published

Module install

This is a tool to install NPM modules, taking into account Lerna weirdness and Yarn workspaces.

const moduleInstall = require('@fesk/module-install');

moduleInstall('fs-extra@^5.0.0');

Running this will get you:

ℹ Detected lerna project
ℹ Detected yarn workspaces
✔ Successfully installed fs-extra@^5.0.0

If you install a local package:

ℹ Detected lerna project
ℹ Detected local lerna package
✔ Successfully installed @fesk/plugin-metalsmith@^1.0.0

Second option lets you turn of logging or change the directory:

moduleInstall('fs-extra@^5.0.0', {
  log: false,
  packagePath: './somewhere/else',
  dev: true, // --save-dev option
});

It returns a promise, so can be used by other tools.

Its possible we could turn this in a bin, as a quick command-line tool for installing packages without the problems of Lerna/Yarn/NPM!

Readme

Keywords

none

Package Sidebar

Install

npm i @fesk/module-install

Weekly Downloads

5

Version

1.2.1

License

MIT

Unpacked Size

10.3 kB

Total Files

16

Last publish

Collaborators

  • stephenwf