Home

Awesome

Plop Pack Npm Install Packages

npm

A PlopJS action to install packages with NPM.

Installation

npm i plop-pack-npm-install-packages

Usage

module.exports = (plop) => {
  // Loads the npmInstall action type
  plop.load('plop-pack-npm-install-packages');
  plop.setGenerator('generator-name', {
    prompts: [
      // ...
    ],
    actions: [
      {
        type: 'npmInstallPackages',
        // Can be a string or an array
        install: ['react', 'lodash@4.17.14'],
      },
    ],
  });
};

For a Plop action that runs npm install for all the dependencies in a package.json, check out plop-pack-npm-install.