0.5.0 • Published 6 years ago

dump-git-logs v0.5.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

dump-git-logs

Install

npm i -D dump-git-logs

Usage

const DumpGitLogs = require('dump-git-logs').default;
const path = require('path');

const options = { // Check below for all the options
    fileName: 'CHANGELOG.md',
    filePath: path.resolve(__dirname, '..'),
    type: 'oneline',
    raw: false
}

DumpGitLogs(options); // Will create a CHANGELOG.md file at the given path

parsed Ouput for oneline type would be as follows

You can find sample outputs for each type in the sample-logs folder.

Options

List of options supported by dump-git-logs;

fileName

Name of the file

  • Default: CHANGELOG.md
  • Required : false

filePath

File Path where the log needs to be dumped to

  • Required : true

type

Git log type

  • Default: default
  • Required : false

raw

Should the output be parsed to a table view or not. Applicable only for pre-defined types except userdefined.

  • Default : false
  • Required : false

type

Git log type

  • Default: default
  • Required : false

Available Types:

user defined git log

If you would like to run your own git log query, you can do so as below

const DumpGitLogs = require('dump-git-logs').default;
const path = require('path');

const options = { // Check below for all the options
    fileName: 'CHANGELOG.md',
    filePath: path.resolve(__dirname, '..'),
    type: 'userdefined',
    cmd: 'git log -p' // required, if type: 'userdefined'
}

DumpGitLogs(options); // Will create a CHANGELOG.md file at the given path

License

MIT © Arvind Ravulavaru