forked from brownhci/WebGazer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
86 lines (83 loc) · 2.29 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.initConfig({
concat: {
dist: {
nonull: true,
src: [
'dependencies/js-objectdetect/js/objectdetect.js',
'dependencies/js-objectdetect/js/objectdetect.eye.js ',
'dependencies/js-objectdetect/js/objectdetect.frontalface_alt.js ',
'dependencies/tracking.js/build/tracking.js',
'dependencies/tracking.js/build/data/face-min.js',
'dependencies/tracking.js/build/data/eye-min.js',
'dependencies/clmtrackr/utils.js',
'dependencies/numeric-1.2.6.min.js',
'dependencies/clmtrackr/mosse.js',
'dependencies/clmtrackr/jsfeat-min.js',
'dependencies/clmtrackr/frontalface.js',
'dependencies/clmtrackr/jsfeat_detect.js',
'dependencies/clmtrackr/left_eye_filter.js',
'dependencies/clmtrackr/right_eye_filter.js',
'dependencies/clmtrackr/nose_filter.js',
'dependencies/clmtrackr/model_pca_20_svm.js',
'dependencies/clmtrackr/clm.js',
'dependencies/clmtrackr/svmfilter_webgl.js',
'dependencies/clmtrackr/svmfilter_fft.js',
'dependencies/clmtrackr/mossefilter.js',
'src/blinkDetector.js',
'src/clmGaze.js',
'src/trackingjsGaze.js',
'src/js_objectdetectGaze.js',
'src/linearReg.js',
'src/mat.js',
'src/pupil.js',
'src/regression.js',
'src/ridgeReg.js',
'src/ridgeWeightedReg.js',
'src/ridgeRegThreaded.js',
'src/util.js',
'src/webgazer.js',
],
dest: './build/webgazer.js',
}
},
uglify: {
options: {
preserveComments: false,
mangle: false,
compress: {
sequences: true,
dead_code: true,
conditionals: true,
booleans: true,
loops: true,
unused: false,
evaluate: true,
comparisons: true,
if_return: true,
join_vars: true,
properties: true,
}
},
dist: {
src: ['./build/webgazer.js'],
dest: 'build/webgazer.min.js'
}
}
});
// Default task.
grunt.registerTask('default', [
'concat',
'uglify'
]);
grunt.registerTask('warn-fail', 'Fail on warning log', function() {
var log = grunt.log;
var _warn = log.warn;
log.warn = function() {
_warn.apply(log, arguments);
grunt.fail.warn("Warning log has triggered failure");
};
});
};