1.1.6 • Published 4 years ago

contributors-timer v1.1.6

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

Node apps time logger; it's helpful to count the time you spend in Nodejs project.

How does this is works ?

  • Getting user information form .git/config file
  • Getting current appointed branch
  • Creates a JSON file in your repo folder "timerlog.json"
  • Saving duration time each 60 seconds

Install

yarn add contributors-timer

or

npm i contributors-timer

Usage

Add email and user name for git

git config user.name "Your Name"
git config user.email email@example.com

NodeJs App:

const timer = require('contributors-timer');

const gitPath = './.git/';
const timerlogPath = './';

timer.start(gitPath, timerlogPath);

Gulp:

var timer = require('contributors-timer');

gulp.task('startTimer', function() {
  timer.start();
});

gulp.task('dev', ['startTimer', ...], function() {
	gulp.watch(..);
});

Preview

{
  "user1@example.com": {
    "name": "User 1",
    "email": "user1@example.com",
    "total_time": 4669,
    "branches":
    {
      "master": 4435,
      "develop": 234,
    }
  },
  "user2@example.com": {
    ...
  }
}

Any thing else ?

Feel free to open issue here

1.1.6

4 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago