Permalink
Browse files

adding more details to stats

  • Loading branch information...
1 parent 5ef1abf commit ba2f07a3f62e3b2a356849ee696432e650461037 @goatslacker committed Sep 8, 2011
Showing with 45 additions and 5 deletions.
  1. +1 −1 .data.json
  2. +7 −0 Makefile
  3. +7 −4 lib/stats.js
  4. +30 −0 package.json
View
@@ -1 +1 @@
-{"push":3,"st":2,"init":1,"add":1}
+{"st":[{"date":1315495479583,"details":[]}],"add":[{"date":1315495495100,"details":["."]}]}
View
@@ -0,0 +1,7 @@
+all: uninstall install
+
+#install:
+# @npm install -g
+#
+#uninstall:
+# @npm uninstall git-stats -g
View
@@ -22,12 +22,15 @@ const stats = function (args) {
var command = args.shift();
- if (data.stats.hasOwnProperty(command)) {
- data.stats[command] += 1;
- } else {
- data.stats[command] = 1;
+ if (!data.stats.hasOwnProperty(command)) {
+ data.stats[command] = [];
}
+ data.stats[command].push({
+ date: Date.now(),
+ details: args
+ });
+
data.write();
};
View
@@ -0,0 +1,30 @@
+{
+ "name": "git-stats",
+ "author": "Josh Perez <josh@goatslacker.com>",
+ "version": "0.0.1",
+ "description": "Git statistics for you",
+
+ "keywords": [
+ "git",
+ "stats",
+ "statistics",
+ "scrobbling"
+ ],
+
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/goatslacker/git-stats.git"
+ },
+
+ "preferGlobal": true,
+
+ "licenses": ["MIT"],
+
+ "bin": {
+ "git-stats": "./bin/git-stats"
+ },
+
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+}

0 comments on commit ba2f07a

Please sign in to comment.