-
Notifications
You must be signed in to change notification settings - Fork 10
/
gruntfile.js
47 lines (43 loc) · 1.31 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
module.exports = grunt => {
grunt.initConfig({
concat: {
options: {
sourceMap: true
},
"js": {
src: ["dev/websight.js", "dev/filters.js", "dev/ui.js"],
dest: "dist/websight.concat.js"
},
"deps": {
src: ["lib/jscolor.js", "lib/StereoEffect.js", "lib/VREffect.js"],
dest: "dist/dependencies.concat.js"
}
},
uglify: {
my_target: {
options: {
sourceMap: true,
mangle: false,
},
files: {
"dist/websight.min.js" : ["dist/websight.concat.js"],
"dist/dependencies.min.js" : ["lib/three.min.js", "dist/dependencies.concat.js"]
}
}
},
watch: {
dev: {
files: ["dev/*.js"],
tasks: ["concat:js", "uglify"]
},
deps: {
files: ["lib/*.js"],
tasks: ["concat:deps", "uglify"]
}
}
})
grunt.loadNpmTasks("grunt-contrib-watch")
grunt.loadNpmTasks('grunt-contrib-concat')
grunt.loadNpmTasks('grunt-contrib-uglify-es')
grunt.registerTask("default", ["watch"])
}