Replacing git-stats-config.json with git-stats-config.js

This commit is contained in:
Ionică Bizău 2015-11-01 12:39:10 +02:00
parent 0dc236558b
commit 85080f12bd
2 changed files with 14 additions and 41 deletions

View File

@ -1,19 +1,3 @@
<!---------------------------------------------------------------------------->
<!-- STOP, LOOK & LISTEN! -->
<!-- ==================== -->
<!-- Do NOT edit this file directly since it's generated from a template -->
<!-- file, using https://github.com/IonicaBizau/node-blah -->
<!-- -->
<!-- If you found a typo in documentation, fix it in the source files -->
<!-- (`lib/*.js`) and make a pull request. -->
<!-- -->
<!-- If you have any other ideas, open an issue. -->
<!-- -->
<!-- Please consider reading the contribution steps (CONTRIBUTING.md). -->
<!-- * * * Thanks! * * * -->
<!---------------------------------------------------------------------------->
<% // Dependencies %>
<% var IsThere = require("is-there"); %>
<% var Fs = require("fs"); %>
@ -100,7 +84,7 @@ Examples:
git-stats -s '1 January 2012' # All the commits from 1 January 2012 to now
git-stats -s '1 January 2012' -u '31 December 2012' # All the commits from 2012
Your commit history is kept in ~/.git-stats by default. You can create ~/.git-stats-config.json to specify different defaults.
Your commit history is kept in ~/.git-stats by default. You can create ~/.git-stats-config.js to specify different defaults.
Documentation can be found at https://github.com/IonicaBizau/git-stats
```
@ -161,12 +145,12 @@ For more detailed documentation, check out the repository: https://github.com/Io
If want to get even more GitHub stats in your terminal, you may want to try [`github-stats`](https://github.com/IonicaBizau/github-stats)--this is like `git-stats` but with data taken from GitHub.
## Using the configuration file
You can tweak the git-stats behavior using a configuration file in your home directory: `~/.git-stats-config.json`.
You can tweak the git-stats behavior using a configuration file in your home directory: `~/.git-stats-config.js`.
This file will contain a JSON object like below (in this example comments are added to explain what's going on, but you should not include them since the JSON format doesn't support such comments). Defaults are listed.
This file should export an object, like below (defaults are listed):
```js
{
module.exports = {
// "DARK", "LIGHT" or an object interpreted by IonicaBizau/node-git-stats-colors
"theme": "DARK"
@ -194,6 +178,8 @@ This file will contain a JSON object like below (in this example comments are ad
}
```
Since it's a js file, you can `require` any other modules there.
## Cross-platform compatibility
`git-stats` is working fine in terminal emulators supporting ANSI styles. It should work fine on Linux and OS X.
@ -250,5 +236,5 @@ a copy of the license.
[contributing]: /CONTRIBUTING.md
[website]: http://ionicabizau.net
[docs]: /DOCUMENTATION.md
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MG98D7NPFZ3MG
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW
[donate-now]: http://i.imgur.com/6cMbHOC.png

View File

@ -1,18 +1,3 @@
<!---------------------------------------------------------------------------->
<!-- STOP, LOOK & LISTEN! -->
<!-- ==================== -->
<!-- Do NOT edit this file directly since it's generated from a template -->
<!-- file, using https://github.com/IonicaBizau/node-blah -->
<!-- -->
<!-- If you found a typo in documentation, fix it in the source files -->
<!-- (`lib/*.js`) and make a pull request. -->
<!-- -->
<!-- If you have any other ideas, open an issue. -->
<!-- -->
<!-- Please consider reading the contribution steps (CONTRIBUTING.md). -->
<!-- * * * Thanks! * * * -->
<!---------------------------------------------------------------------------->
![git-stats](http://i.imgur.com/Q7TQYHx.png)
# `$ git-stats` [![Donate now][donate-now]][paypal-donations]
@ -75,7 +60,7 @@ Examples:
git-stats -s '1 January 2012' # All the commits from 1 January 2012 to now
git-stats -s '1 January 2012' -u '31 December 2012' # All the commits from 2012
Your commit history is kept in ~/.git-stats by default. You can create ~/.git-stats-config.json to specify different defaults.
Your commit history is kept in ~/.git-stats by default. You can create ~/.git-stats-config.js to specify different defaults.
Documentation can be found at https://github.com/IonicaBizau/git-stats
```
@ -136,12 +121,12 @@ For more detailed documentation, check out the repository: https://github.com/Io
If want to get even more GitHub stats in your terminal, you may want to try [`github-stats`](https://github.com/IonicaBizau/github-stats)--this is like `git-stats` but with data taken from GitHub.
## Using the configuration file
You can tweak the git-stats behavior using a configuration file in your home directory: `~/.git-stats-config.json`.
You can tweak the git-stats behavior using a configuration file in your home directory: `~/.git-stats-config.js`.
This file will contain a JSON object like below (in this example comments are added to explain what's going on, but you should not include them since the JSON format doesn't support such comments). Defaults are listed.
This file should export an object, like below (defaults are listed):
```js
{
module.exports = {
// "DARK", "LIGHT" or an object interpreted by IonicaBizau/node-git-stats-colors
"theme": "DARK"
@ -169,6 +154,8 @@ This file will contain a JSON object like below (in this example comments are ad
}
```
Since it's a js file, you can `require` any other modules there.
## Cross-platform compatibility
`git-stats` is working fine in terminal emulators supporting ANSI styles. It should work fine on Linux and OS X.
@ -214,5 +201,5 @@ a copy of the license.
[contributing]: /CONTRIBUTING.md
[website]: http://ionicabizau.net
[docs]: /DOCUMENTATION.md
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MG98D7NPFZ3MG
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW
[donate-now]: http://i.imgur.com/6cMbHOC.png