1.2.1 • Published 4 years ago

@fesk/module-install v1.2.1

Weekly downloads
78
License
MIT
Repository
-
Last release
4 years ago

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!

1.2.1

5 years ago

1.2.0

5 years ago

1.1.2

6 years ago

1.0.2

6 years ago

0.0.1

6 years ago