Skip to content

crutchcorn/plop-pack-git-init

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plop Pack Git Init

npm

Useful to have action for PlopJS. This action runs the following commands on the respective path passed to it:

git init
git add -A
git commit -m "Initial commit"

Installation

npm i plop-pack-git-init

Example

module.exports = function(plop) {
  // Loads the gitInit action type
  plop.load('plop-pack-git-init');

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

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

      return actions;
    }
  })
}

About

A plop helper that provides a git init action for CLI purposes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published