plop-pack-git-init
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

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

z

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;
    }
  })
}

Readme

Keywords

none

Package Sidebar

Install

npm i plop-pack-git-init

Weekly Downloads

0

Version

0.3.1

License

MIT

Unpacked Size

3.19 kB

Total Files

4

Last publish

Collaborators

  • crutchcorn