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 protected]
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(..);
});
{
"[email protected]": {
"name": "User 1",
"email": "[email protected]",
"total_time": 4669,
"branches":
{
"master": 4435,
"develop": 234,
}
},
"[email protected]": {
...
}
}
Feel free to open issue here