-
Notifications
You must be signed in to change notification settings - Fork 31
/
gruntfile.js
33 lines (28 loc) · 924 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
module.exports = grunt => {
grunt.initConfig({
uglify: {
my_target: {
options: {
sourceMap: false,
mangle: false,
},
files: {
"dist/appWASM.js" : ["dist/appWASM.js"]
}
}
},
exec: {
build: "C:/emsdk/emsdk_env.bat & echo Building... & emcc -o ./dist/appWASM.js ./dev/cpp/emscripten.cpp -O3 -s ALLOW_MEMORY_GROWTH=1 -s USE_WEBGL2=1 -s WASM=1 -s NO_EXIT_RUNTIME=1 -std=c++1z"
},
watch: {
cpp: {
files: ["dev/cpp/*.cpp", "dev/cpp/*.h"],
tasks: ["exec:build", "uglify"]
}
}
})
grunt.loadNpmTasks("grunt-contrib-watch")
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks("grunt-exec")
grunt.registerTask("default", ["watch"])
}