0.0.1 • Published 7 years ago

grunt-git-info v0.0.1

Weekly downloads
35
License
ISC
Repository
github
Last release
7 years ago

grunt-git-info v0.0.1

Write Git commit information into a file

Getting Started

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-git-info --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-git-info');

Configuration

This task should be configured according to the grunt Configuring tasks guide.

ParameterDescriptionDefault value
repositorypath to git repository rootempty string
outputname of the target file to be generatedgitInfo.json
fieldsan array defining set and order of fields of output filebranch, commit, short, timestamp, author, message, status

Usage Examples

All-defaults

{
  gitInfo: {}
}

Custom file name and list of fields

{
  gitInfo: {
    output: 'commit-information.json',
    fields: [
      'commit',
      'timestamp',
      'author'
    ]
  }
}

Credits

This development was inspired by these great works:

Final Notes

Licensed under terms of ISC License.

Should you have any feedback, questions, bug reports or feature requests, please file an issue.