Skip to content

Commit 66d63af

Browse files
committed
Updated docs
1 parent e67e4ad commit 66d63af

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33
*~
44
*.log
55
node_modules
6+
*.env
7+
.DS_Store
8+
package-lock.json

DOCUMENTATION.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ You can see below the API reference of this module.
55
### `GitStats(dataPath)`
66

77
#### Params
8+
89
- **String** `dataPath`: Path to the data file.
910

1011
#### Return
@@ -14,6 +15,7 @@ You can see below the API reference of this module.
1415
Fetches the configuration object from file (`~/.git-stats-config.js`).
1516

1617
#### Params
18+
1719
- **Function** `callback`: The callback function.
1820

1921
#### Return
@@ -23,13 +25,15 @@ Fetches the configuration object from file (`~/.git-stats-config.js`).
2325
Inits the configuration field (`this.config`).
2426

2527
#### Params
28+
2629
- **Object|String** `input`: The path to a custom git-stats configuration file or the configuration object.
2730
- **Function** `callback`: The callback function.
2831

2932
### `record(data, callback)`
3033
Records a new commit.
3134

3235
#### Params
36+
3337
- **Object** `data`: The commit data containing:
3438
- `date` (String|Date): The date object or a string in a format that can be parsed.
3539
- `url` (String): The repository remote url.
@@ -46,6 +50,7 @@ removeCommit
4650
Deletes a specifc commit from the history.
4751

4852
#### Params
53+
4954
- **Object** `data`: The commit data containing:
5055
- `date` (String|Date): The date object or a string in a format that can be parsed. If not provided, the hash object will be searched in all dates.
5156
- `hash` (String): The commit hash.
@@ -60,6 +65,7 @@ Deletes a specifc commit from the history.
6065
Gets the git stats.
6166

6267
#### Params
68+
6369
- **Function** `callback`: The callback function.
6470

6571
#### Return
@@ -69,6 +75,7 @@ Gets the git stats.
6975
Saves the provided stats.
7076

7177
#### Params
78+
7279
- **Object** `stats`: The stats to be saved.
7380
- **Function** `callback`: The callback function.
7481

@@ -79,6 +86,7 @@ Saves the provided stats.
7986
Iterate through the days, calling the callback function on each day.
8087

8188
#### Params
89+
8290
- **Object** `data`: An object containing the following fields:
8391
- `start` (Moment): A `Moment` date object representing the start date (default: *an year ago*).
8492
- `end` (Moment): A `Moment` date object representing the end date (default: *now*).
@@ -92,6 +100,7 @@ Iterate through the days, calling the callback function on each day.
92100
Creates an object with the stats on the provided period (default: *last year*).
93101

94102
#### Params
103+
95104
- **Object** `data`: The object passed to the `iterateDays` method.
96105
- **Function** `callback`: The callback function.
97106

@@ -102,6 +111,7 @@ Creates an object with the stats on the provided period (default: *last year*).
102111
Creates the calendar data for the provided period (default: *last year*).
103112

104113
#### Params
114+
105115
- **Object** `data`: The object passed to the `graph` method.
106116
- **Function** `callback`: The callback function.
107117

@@ -112,6 +122,7 @@ Creates the calendar data for the provided period (default: *last year*).
112122
Creates the ANSI contributions calendar.
113123

114124
#### Params
125+
115126
- **Object** `options`: The object passed to the `calendar` method.
116127
- **Function** `callback`: The callback function.
117128

@@ -122,6 +133,7 @@ Creates the ANSI contributions calendar.
122133
Creates an array with the authors of a git repository.
123134

124135
#### Params
136+
125137
- **String|Object** `options`: The repo path or an object containing the following fields:
126138
- `repo` (String): The repository path.
127139
- **Function** `callback`: The callback function.
@@ -133,6 +145,7 @@ Creates an array with the authors of a git repository.
133145
Creates the authors pie.
134146

135147
#### Params
148+
136149
- **String|Object** `options`: The repo path or an object containing the following fields:
137150
- `repo` (String): The repository path.
138151
- `radius` (Number): The pie radius.
@@ -147,6 +160,7 @@ Creates the authors pie.
147160
Creates the global contributions calendar (all commits made by all committers).
148161

149162
#### Params
163+
150164
- **String|Object** `options`: The repo path or an object containing the following fields:
151165
- `repo` (String): The repository path.
152166
- `start` (String): The start date.

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->
2+
13

24
[![git-stats](http://i.imgur.com/Q7TQYHx.png)](#)
35

46
# `$ git-stats`
57

6-
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Version](https://img.shields.io/npm/v/git-stats.svg)](https://www.npmjs.com/package/git-stats) [![Downloads](https://img.shields.io/npm/dt/git-stats.svg)](https://www.npmjs.com/package/git-stats)
8+
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Version](https://img.shields.io/npm/v/git-stats.svg)](https://www.npmjs.com/package/git-stats) [![Downloads](https://img.shields.io/npm/dt/git-stats.svg)](https://www.npmjs.com/package/git-stats)
79

810
> Local git statistics including GitHub-like contributions calendars.
911
@@ -230,13 +232,15 @@ g1.ansiCalendar({
230232
});
231233
```
232234

235+
236+
233237
## :question: Get Help
234238

235239
There are few ways to get help:
236240

237241
1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.
238242
2. For bug reports and feature requests, open issues. :bug:
239-
3. For direct and quick help from me, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
243+
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
240244

241245

242246
## :memo: Documentation
@@ -260,6 +264,7 @@ this takes time. You can integrate and use these projects in your applications *
260264
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
261265

262266
- Starring and sharing the projects you like :rocket:
267+
- [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:
263268
- [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
264269
- [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
265270
- **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`

0 commit comments

Comments
 (0)