build(analytics): add support for tracking npm installs

Since the very first npm install is called while node_modules is empty, we need to ignore it, but we can track
the start timestamp and record the install even once the installation is completed.
This commit is contained in:
Igor Minar
2015-10-27 23:19:52 +01:00
parent edd4b93589
commit ae7f76e91f
4 changed files with 135 additions and 30 deletions

View File

@ -1317,5 +1317,6 @@ process.on('beforeExit', function() {
});
gulp.on('task_stop', (e) => { analytics.build('gulp ' + e.task, e.duration*1000)});
gulp.on('task_err', (e) => { analytics.build('gulp ' + e.task + ' (errored)', e.duration*1000)});
gulp.on('task_start', (e) => { analytics.buildStart('gulp ' + e.task)});
gulp.on('task_stop', (e) => { analytics.buildSuccess('gulp ' + e.task, e.duration*1000)});
gulp.on('task_err', (e) => { analytics.buildError('gulp ' + e.task, e.duration*1000)});