Node apps time logger; it's helpful to count the time you spend in Nodejs project.
- 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
yarn add contributors-timer
or
npm i contributors-timer
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(..);
});
{
"user1@example.com": {
"name": "User 1",
"email": "user1@example.com",
"total_time": 4669,
"branches":
{
"master": 4435,
"develop": 234,
}
},
"user2@example.com": {
...
}
}
Feel free to open issue here