- Notifications
You must be signed in to change notification settings - Fork0
🐚 A ShellJS plugin for generating a nicely formatted list of authors.
License
tanem/shelljs-plugin-authors
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
AShellJS plugin for generating a nicely formatted list of authors.
Let's assume that we're inside a git repo, and the output ofgit shortlog -se gives us something like:
24 Andrew Powlowski <Andrew_Powlowski@yahoo.com> 39 Gregorio Heaney <Gregorio.Heaney43@yahoo.com> 55 Miller Reichel <Miller_Reichel@yahoo.com> 70 Mervin Graham <Mervin69@yahoo.com> 99 Hallie Paucek <Hallie.Paucek@yahoo.com>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:
constshell=require('shelljs')require('shelljs-plugin-authors')constauthors=shell.authors()shell.echo(authors.stdout)/*Andrew Powlowski <Andrew_Powlowski@yahoo.com>Gregorio Heaney <Gregorio.Heaney43@yahoo.com>Miller Reichel <Miller_Reichel@yahoo.com>Mervin Graham <Mervin69@yahoo.com>Hallie Paucek <Hallie.Paucek@yahoo.com>*/
Or you can use it via the CLI:
$ shelljs-authorsAndrew Powlowski <Andrew_Powlowski@yahoo.com>Gregorio Heaney <Gregorio.Heaney43@yahoo.com>Miller Reichel <Miller_Reichel@yahoo.com>Mervin Graham <Mervin69@yahoo.com>Hallie Paucek <Hallie.Paucek@yahoo.com>If you'd prefer the list be sorted by number of commits per author, pass the-n option:
constshell=require('shelljs')require('shelljs-plugin-authors')constauthors=shell.authors('-n')shell.echo(authors.stdout)/*Hallie Paucek <Hallie.Paucek@yahoo.com>Mervin Graham <Mervin69@yahoo.com>Miller Reichel <Miller_Reichel@yahoo.com>Gregorio Heaney <Gregorio.Heaney43@yahoo.com>Andrew Powlowski <Andrew_Powlowski@yahoo.com>*/
$ shelljs-authors -nHallie Paucek <Hallie.Paucek@yahoo.com>Mervin Graham <Mervin69@yahoo.com>Miller Reichel <Miller_Reichel@yahoo.com>Gregorio Heaney <Gregorio.Heaney43@yahoo.com>Andrew Powlowski <Andrew_Powlowski@yahoo.com>Options
-n-Optional Sort the list by number of commits per author.
Example
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-authorsMIT
About
🐚 A ShellJS plugin for generating a nicely formatted list of authors.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.