From 85080f12bddf8531e85e8cdc00a8ad6aa9e9d84d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionic=C4=83=20Biz=C4=83u?= Date: Sun, 1 Nov 2015 12:39:10 +0200 Subject: [PATCH] Replacing git-stats-config.json with git-stats-config.js --- .blah/README.ejs | 28 +++++++--------------------- README.md | 27 +++++++-------------------- 2 files changed, 14 insertions(+), 41 deletions(-) diff --git a/.blah/README.ejs b/.blah/README.ejs index 5a2b7d9..f900a2d 100644 --- a/.blah/README.ejs +++ b/.blah/README.ejs @@ -1,19 +1,3 @@ - - - - - - - - - - - - - - - - <% // 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 diff --git a/README.md b/README.md index 2dbdeed..fb2fcd4 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,3 @@ - - - - - - - - - - - - - - - ![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 \ No newline at end of file