Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

RiverSongFox/grunt-git-info

Repository files navigation

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.

Parameter Description Default value
repository path to git repository root empty string
output name of the target file to be generated gitInfo.json
fields an array defining set and order of fields of output file branch, 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.

About

Write Git commit information into a file

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published