This repository was archived by the owner on Apr 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgruntfile.js
More file actions
78 lines (76 loc) · 1.93 KB
/
gruntfile.js
File metadata and controls
78 lines (76 loc) · 1.93 KB
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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
coffee: {
main: {
expand: true,
cwd: "src/main/coffee",
src: ["**/*.coffee", "**/*.generated.coffee"],
dest: "src/main/js",
ext: ".js"
},
test: {
expand: true,
cwd: "src/test/coffee",
src: ["**/*.coffee"],
dest: "src/test/js",
ext: ".js"
}
},
browserify: {
client: {
files: {
"public2/big-canvas.js": ["src/main/js/client/main.js"]
}
}
},
less: {
main: {
files: {
"public2/big-canvas.css": "src/main/less/main.less"
}
}
},
execute: {
server: {
src: ["src/main/js/server/main.js"]
},
database: {
src: ["src/main/js/tools/initdb.js"]
}
},
mochaTest: {
test: {
src: ["src/test/js/**/*.js"]
}
},
watch: {
main: {
files: "src/main/coffee/**/*.coffee",
tasks: ["coffee:main", "browserify:client"]
},
style: {
files: "src/main/less/**/*.less",
tasks: ["less:main"]
}
},
exec: {
schema: {
cmd: "java -jar bin/jsonschemadsl-compiler.jar src/main/coffee/rpc/big-canvas.jsonschema"
}
}
});
grunt.loadNpmTasks("grunt-browserify");
grunt.loadNpmTasks("grunt-contrib-coffee");
grunt.loadNpmTasks("grunt-execute");
grunt.loadNpmTasks("grunt-mocha-test");
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
grunt.registerTask("default", [/*"less:main",*/ "coffee:main", "browserify:client", "execute:server"]);
grunt.registerTask("test", ["coffee:main", "coffee:test", "mochaTest:test"]);
grunt.registerTask("watching", ["watch:main"]);
grunt.registerTask("init", ["coffee:main", "execute:database"]);
grunt.registerTask("rpc", ["exec:schema"]);
grunt.registerTask("style", ["less:main"]);
};