@@ -30,39 +30,39 @@ module.exports = function (grunt) {
3030
3131 var modules = {
3232
33- 'pixi' : { 'description' : 'Pixi.js' , 'optional' : true } ,
34- 'intro' : { 'description' : 'Phaser UMD wrapper' , 'optional' : false } ,
35- 'phaser' : { 'description' : 'Phaser Globals' , 'optional' : false } ,
36- 'geom' : { 'description' : 'Geometry Classes' , 'optional' : false } ,
37- 'core' : { 'description' : 'Phaser Core' , 'optional' : false } ,
38- 'input' : { 'description' : 'Input Manager + Mouse and Touch Support' , 'optional' : false } ,
39- 'gamepad' : { 'description' : 'Gamepad Input' , 'optional' : true } ,
40- 'keyboard' : { 'description' : 'Keyboard Input' , 'optional' : true } ,
41- 'components' : { 'description' : 'Game Object Components' , 'optional' : false } ,
42- 'gameobjects' : { 'description' : 'Core Game Objects' , 'optional' : false } ,
43- 'bitmapdata' : { 'description' : 'BitmapData Game Object' , 'optional' : true } ,
44- 'graphics' : { 'description' : 'Graphics Game Object' , 'optional' : true } ,
45- 'rendertexture' : { 'description' : 'RenderTexture Game Object' , 'optional' : true } ,
46- 'text' : { 'description' : 'Text Game Object (inc. Web Font Support)' , 'optional' : true } ,
47- 'bitmaptext' : { 'description' : 'BitmapText Support' , 'optional' : true } ,
48- 'retrofont' : { 'description' : 'Retro Fonts Support' , 'optional' : true } ,
49- 'system' : { 'description' : 'System Classes' , 'optional' : false } ,
50- 'math' : { 'description' : 'Math, QuadTree and RND' , 'optional' : false } ,
51- 'net' : { 'description' : 'Network Class' , 'optional' : true } ,
52- 'tweens' : { 'description' : 'Tween Manager' , 'optional' : true } ,
53- 'time' : { 'description' : 'Time and Clock Manager' , 'optional' : false } ,
54- 'animation' : { 'description' : 'Animation and Frame Manager' , 'optional' : false } ,
55- 'loader' : { 'description' : 'Loader and Cache' , 'optional' : false } ,
56- 'sound' : { 'description' : 'Sound Support (Web Audio and HTML Audio)' , 'optional' : true } ,
57- 'debug' : { 'description' : 'Debug Class' , 'optional' : true } ,
58- 'utils' : { 'description' : 'Core Utilities' , 'optional' : false } ,
59- 'physics' : { 'description' : 'Physics Manager' , 'optional' : false } ,
60- 'arcade' : { 'description' : 'Arcade Physics' , 'optional' : true } ,
61- 'ninja' : { 'description' : 'Ninja Physics' , 'optional' : true } ,
62- 'p2' : { 'description' : 'P2 Physics' , 'optional' : true } ,
63- 'tilemaps' : { 'description' : 'Tilemap Support' , 'optional' : true } ,
64- 'particles' : { 'description' : 'Arcade Physics Particle System' , 'optional' : true } ,
65- 'outro' : { 'description' : 'Phaser UMD closure' , 'optional' : false }
33+ 'pixi' : { 'description' : 'Pixi.js' , 'optional' : true , 'stub' : false } ,
34+ 'intro' : { 'description' : 'Phaser UMD wrapper' , 'optional' : false , 'stub' : false } ,
35+ 'phaser' : { 'description' : 'Phaser Globals' , 'optional' : false , 'stub' : false } ,
36+ 'geom' : { 'description' : 'Geometry Classes' , 'optional' : false , 'stub' : false } ,
37+ 'core' : { 'description' : 'Phaser Core' , 'optional' : false , 'stub' : false } ,
38+ 'input' : { 'description' : 'Input Manager + Mouse and Touch Support' , 'optional' : false , 'stub' : false } ,
39+ 'gamepad' : { 'description' : 'Gamepad Input' , 'optional' : true , 'stub' : false } ,
40+ 'keyboard' : { 'description' : 'Keyboard Input' , 'optional' : true , 'stub' : false } ,
41+ 'components' : { 'description' : 'Game Object Components' , 'optional' : false , 'stub' : false } ,
42+ 'gameobjects' : { 'description' : 'Core Game Objects' , 'optional' : false , 'stub' : false } ,
43+ 'bitmapdata' : { 'description' : 'BitmapData Game Object' , 'optional' : true , 'stub' : false } ,
44+ 'graphics' : { 'description' : 'Graphics Game Object' , 'optional' : true , 'stub' : false } ,
45+ 'rendertexture' : { 'description' : 'RenderTexture Game Object' , 'optional' : true , 'stub' : false } ,
46+ 'text' : { 'description' : 'Text Game Object (inc. Web Font Support)' , 'optional' : true , 'stub' : false } ,
47+ 'bitmaptext' : { 'description' : 'BitmapText Support' , 'optional' : true , 'stub' : false } ,
48+ 'retrofont' : { 'description' : 'Retro Fonts Support' , 'optional' : true , 'stub' : false } ,
49+ 'system' : { 'description' : 'System Classes' , 'optional' : false , 'stub' : false } ,
50+ 'math' : { 'description' : 'Math, QuadTree and RND' , 'optional' : false , 'stub' : false } ,
51+ 'net' : { 'description' : 'Network Class' , 'optional' : true , 'stub' : false } ,
52+ 'tweens' : { 'description' : 'Tween Manager' , 'optional' : true , 'stub' : true } ,
53+ 'time' : { 'description' : 'Time and Clock Manager' , 'optional' : false , 'stub' : false } ,
54+ 'animation' : { 'description' : 'Animation and Frame Manager' , 'optional' : false , 'stub' : false } ,
55+ 'loader' : { 'description' : 'Loader and Cache' , 'optional' : false , 'stub' : false } ,
56+ 'sound' : { 'description' : 'Sound Support (Web Audio and HTML Audio)' , 'optional' : true , 'stub' : true } ,
57+ 'debug' : { 'description' : 'Debug Class' , 'optional' : true , 'stub' : false } ,
58+ 'utils' : { 'description' : 'Core Utilities' , 'optional' : false , 'stub' : false } ,
59+ 'physics' : { 'description' : 'Physics Manager' , 'optional' : false , 'stub' : false } ,
60+ 'arcade' : { 'description' : 'Arcade Physics' , 'optional' : true , 'stub' : false } ,
61+ 'ninja' : { 'description' : 'Ninja Physics' , 'optional' : true , 'stub' : false } ,
62+ 'p2' : { 'description' : 'P2 Physics' , 'optional' : true , 'stub' : false } ,
63+ 'tilemaps' : { 'description' : 'Tilemap Support' , 'optional' : true , 'stub' : false } ,
64+ 'particles' : { 'description' : 'Arcade Physics Particle System' , 'optional' : true , 'stub' : true } ,
65+ 'outro' : { 'description' : 'Phaser UMD closure' , 'optional' : false , 'stub' : false }
6666
6767 } ;
6868
@@ -150,9 +150,16 @@ module.exports = function (grunt) {
150150
151151 for ( var key in modules )
152152 {
153- // If it's required or NOT excluded, add it to the tasks list
154- if ( modules [ key ] . optional === false || excludes . indexOf ( key ) === - 1 )
153+ if ( modules [ key ] . stub && excludes . indexOf ( key ) !== - 1 )
155154 {
155+ // If the module IS excluded and has a stub, we need that
156+ tasks . push ( 'concat:' + key + 'Stub' ) ;
157+
158+ filelist . push ( '<%= modules_dir %>/' + key + '.js' ) ;
159+ }
160+ else if ( modules [ key ] . optional === false || excludes . indexOf ( key ) === - 1 )
161+ {
162+ // If it's required or NOT excluded, add it to the tasks list
156163 tasks . push ( 'concat:' + key ) ;
157164
158165 filelist . push ( '<%= modules_dir %>/' + key + '.js' ) ;
0 commit comments