-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
57 lines (53 loc) · 965 Bytes
/
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
/* eslint-env node */
module.exports = function(grunt) {
// load all grunt tasks matching the ['grunt-*', '@*/grunt-*'] patterns
require("load-grunt-tasks")(grunt, {pattern: ["grunt-*", "gruntify-*"]});
grunt.initConfig({
eslint: {
src: ["src/*.js"]
},
connect: {
options: {
base: "."
},
server: {
options: {
port: 8000,
keepalive: true
},
},
test: {
options: {
port: 8081,
},
},
},
mocha: {
test: {
options: {
reporter: "spec",
urls: ["http://localhost:8081/test/test.html"]
}
}
},
copy: {
js: {
files: {
"dist/d3-canada-map.js": "src/d3-canada-map.js"
}
}
},
uglify: {
options: {
sourceMap: true
},
all: {
files: {
"dist/d3-canada-map.min.js": "dist/d3-canada-map.js"
}
}
}
});
grunt.registerTask("test", ["connect:test", "mocha"]);
grunt.registerTask("default", ["eslint", "test", "copy", "uglify"]);
};