plop-pack-npm-install-packages

A plop action to install packages with NPM

Usage no npm install needed!

<script type="module">
  import plopPackNpmInstallPackages from 'https://cdn.skypack.dev/plop-pack-npm-install-packages';
</script>

README

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.