-
Notifications
You must be signed in to change notification settings - Fork 49
/
build.js
68 lines (50 loc) · 1.16 KB
/
build.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
59
60
61
62
63
64
65
66
67
68
var cat = require('shelljs').cat;
var files = [
"license.txt",
"src/lib/Ease.js",
"src/Playground.js",
"src/Utils.js",
"src/Events.js",
"src/States.js",
"src/Application.js",
"src/GameLoop.js",
"src/Gamepads.js",
"src/Keyboard.js",
"src/Pointer.js",
"src/Loader.js",
"src/Mouse.js",
"src/Sound.js",
"src/SoundWebAudioAPI.js",
"src/SoundAudio.js",
"src/Touch.js",
"src/Tween.js",
"src/Atlases.js",
"src/Fonts.js",
"src/DefaultState.js",
"src/LoadingScreen.js",
"src/Pool.js"
];
var builds = {
"playground.js": [
"src/lib/CanvasQuery.js",
"src/layer/Layer.js",
"src/layer/Transitions.js",
"src/layer/LoadingScreen.js"
],
"playground-base.js": [
]
};
for (var key in builds) {
var extra = builds[key];
var all = files.concat(extra)
var output = "";
for (var i = 0; i < all.length; i++) {
output += "\n\n/* file: " + all[i] + " */\n\n";
output += cat(all[i]);
}
output.to("build/" + key);
output = 'var PLAYGROUND = {};\n' + output;
output += '\nmodule.exports = playground;';
output += 'playground.Application = PLAYGROUND.Application;';
output.to("build/commonjs/" + key);
}