-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
36 lines (33 loc) · 1.01 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
module.exports = function(grunt) {
grunt.initConfig({
ts: {
default : {
src: ["**/*.ts", "**/*.d.ts", "!emit/**", "!node_modules/**"],
watch: ["."],
out: "bin/js/game.js",
//outDir: 'bin/js/',
options: {
allowJs: true
}
}
},
copy: {
main: {
files: [
// includes files within path
// {expand: false, src: ['nwjs/package.json'], dest: 'build/', filter: 'isFile'},
// includes files within path and its sub-directories
{expand: true, src: ['bin/**','index.html','assets/**','phaser.js'], dest: 'build/'},
// makes all src relative to cwd
{expand: true, cwd: 'nwjs/', src: ['**'], dest: 'build/'},
// flattens results to a single level
// {expand: true, flatten: true, src: ['path/**'], dest: 'dest/', filter: 'isFile'},
],
},
},
});
grunt.loadNpmTasks("grunt-ts");
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask("default", ["ts"]);
grunt.registerTask("build",["copy"])
};