-
Notifications
You must be signed in to change notification settings - Fork 11
/
Gruntfile.js
87 lines (81 loc) · 2.42 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
87
module.exports = function( grunt ) {
"use strict";
var key;
grunt.initConfig( {
pkg: grunt.file.readJSON( "package.json" ),
qunit: {
options: {
timout: 30000,
"--web-security": "no",
coverage: {
src: [ "src/dynamic-time-warping.js" ],
instrumentedFiles: "temp/",
htmlReport: "build/report/coverage",
lcovReport: "build/report/lcov",
linesThresholdPct: 0
}
},
all: "test/index.html"
},
coveralls: {
options: {
force: true
},
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
main_target: {
src: "build/report/lcov/lcov.info"
}
// jscs:enable requireCamelCaseOrUpperCaseIdentifiers
},
jshint: {
options: {
jshintrc: true
},
grunt: "Gruntfile.js",
src: "src/**/*.js",
tests: "test/**/*.js"
},
jscs: {
src: "src/*.js",
gruntfile: "Gruntfile.js",
tests: "test/*.js",
options: {
config: ".jscsrc"
}
},
jsonlint: {
pkg: {
src: [
"package.json"
]
}
},
uglify: {
options: {
banner: "/*! <%= pkg.name %> v<%= pkg.version %> | <%= pkg.license %> */\n"
},
build: {
src: "src/dynamic-time-warping.js",
dest: "dist/dynamic-time-warping.min.js"
}
},
connect: {
server: {
options: {
base: "",
port: 9999
}
}
},
watch: {}
} );
for ( key in grunt.file.readJSON( "package.json" ).devDependencies ) {
if ( key !== "grunt" && key.indexOf( "grunt" ) === 0 ) {
grunt.loadNpmTasks( key );
}
}
grunt.registerTask( "default", [ "jshint", "jscs", "jsonlint", "qunit", "uglify" ] );
grunt.registerTask( "dev", [ "connect", "watch" ] );
grunt.registerTask( "saucelabs", [ "connect", "saucelabs-qunit" ] );
grunt.registerTask( "ci", [ "jshint", "jscs", "jsonlint", "qunit" ] );
};