A ShellJS plugin for generating a nicely formatted list of authors.
npm install shelljs-plugin-authors




> A ShellJS plugin for generating a nicely formatted list of authors.
Let's assume that we're inside a git repo, and the output of git shortlog -se gives us something like:
```
24 Andrew Powlowski
39 Gregorio Heaney
55 Miller Reichel
70 Mervin Graham
99 Hallie Paucek
We want to generate a nicely formatted list of authors sorted alphabetically by author name. There are two ways to do that with this module, first you can use it as a ShellJS plugin:
`js`
const shell = require('shelljs')
require('shelljs-plugin-authors')
const authors = shell.authors()
shell.echo(authors.stdout)
/*
Andrew Powlowski
Gregorio Heaney
Miller Reichel
Mervin Graham
Hallie Paucek
*/
Or you can use it via the CLI:
``
$ shelljs-authors
Andrew Powlowski
Gregorio Heaney
Miller Reichel
Mervin Graham
Hallie Paucek
If you'd prefer the list be sorted by number of commits per author, pass the -n option:
`js`
const shell = require('shelljs')
require('shelljs-plugin-authors')
const authors = shell.authors('-n')
shell.echo(authors.stdout)
/*
Hallie Paucek
Mervin Graham
Miller Reichel
Gregorio Heaney
Andrew Powlowski
*/
``
$ shelljs-authors -n
Hallie Paucek
Mervin Graham
Miller Reichel
Gregorio Heaney
Andrew Powlowski
Options
- -n - _Optional_ Sort the list by number of commits per author.
Example
`js`
shell.authors('-n')
`
$ shelljs-authors -h
Usage: shelljs-authors [options]
Generate a nicely formatted list of authors
Options:
-V, --version output the version number
-n, --numbered Sort by number of commits per author
-h, --help output usage information
Examples:
$ shelljs-authors
$ shelljs-authors -n
`
``
$ npm i -D shelljs shelljs-plugin-authors
```
$ npm i -g shelljs shelljs-plugin-authors
MIT