-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
58 lines (52 loc) · 1.17 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
module.exports = function (grunt) {
require("load-grunt-tasks")(grunt);
grunt.initConfig({
clean: {
"build": ["build"],
"elm-stuff": ["elm-stuff"],
"node_modules": ["node_modules"]
},
shell: {
"elm-make": {
command: "elm make src/main/elm/Main.elm --yes --output build/main.js"
},
},
copy: {
"static-web": {
expand: true,
cwd: "src/main/static-web",
src: "**",
dest: "build/"
},
},
watch: {
"elm": {
files: [
"src/main/elm/**/*.elm",
"src/main/elm/**/*.js"
],
tasks: ["elm-make"],
options: {
spawn: false,
livereload: true
}
},
"static-web": {
files: ["src/main/static-web/**/*"],
tasks: ["copy:static-web"],
options: {
spawn: false,
livereload: true
}
}
}
});
grunt.registerTask("default", function () {
grunt.task.run("clean:build");
grunt.task.run("elm-make");
grunt.task.run("copy:static-web");
});
grunt.registerTask("elm-make", function () {
grunt.task.run("shell:elm-make");
});
};