-
Notifications
You must be signed in to change notification settings - Fork 5
/
Gruntfile.js
48 lines (45 loc) · 1.26 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
ts: {
scripts: {
tsconfig: './scripts/tsconfig.json'
},
src: {
tsconfig: './src/tsconfig.json'
},
test: {
tsconfig: './test/tsconfig.json'
}
},
execute: {
generate_definition: {
src: ['scripts/generate-protocol-interfaces.js']
}
},
connect: {
server: {
options: {
base: "test/www/",
port: 9955
}
}
},
mochacli: {
options: {
files: "test/*.js"
},
spec: {
options: {
reporter: "spec"
}
}
}
});
grunt.loadNpmTasks("grunt-ts");
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks("grunt-execute");
grunt.loadNpmTasks("grunt-mocha-cli");
grunt.registerTask("default", ["ts:scripts", "ts:src", "execute:generate_definition"]);
grunt.registerTask('test', ["default", "ts:test", "connect", "mochacli:spec"]);
};