cli.js 365 B

1234567891011121314151617181920
  1. #!/usr/bin/env node
  2. 'use strict'
  3. const meow = require('meow')
  4. const gitRawCommits = require('./')
  5. const cli = meow(`
  6. Usage
  7. git-raw-commits [<git-log(1)-options>]
  8. Example
  9. git-raw-commits --from HEAD~2 --to HEAD^`
  10. )
  11. gitRawCommits(cli.flags)
  12. .on('error', function (err) {
  13. process.stderr.write(err)
  14. process.exit(1)
  15. })
  16. .pipe(process.stdout)