Skip to content

A plop helper that provides an npm install action for CLI purposes

Notifications You must be signed in to change notification settings

crutchcorn/plop-pack-npm-install

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plop Pack Npm Install

npm

Useful to have action for PlopJS. This action runs npm install on the respective path passed to it.

Installation

npm i plop-pack-npm-install

Example

module.exports = function(plop) {
  // Loads the npmInstall action type
  plop.load('plop-pack-npm-install');

  plop.setGenerator('generate', {
    prompts: [
        // ...
    ],
    actions: function(data) {
      const actions = [];

      actions.push({
        type: 'npmInstall',
        path: `${process.cwd()}/project-name/`,
        // By default is false, but if "true" will log the output of commands
        verbose: true
      })
    }
  })
}

About

A plop helper that provides an npm install action for CLI purposes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published