-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
83 lines (70 loc) · 1.95 KB
/
config.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
* Tasks configuration
* ===================
*/
'use strict';
// Where this project source code lives.
const SRC = 'src';
// Where final distribution files will be copied.
const DIST = 'dist';
// Where compiled scripts will be placed.
const BUILD = 'build';
// Where static assets (textures, fonts, sprites, sounds etc.) live.
const STATIC = 'static';
// Where bundled Phaser CE builds are located.
const PHASER_BUILDS = 'node_modules/phaser-ce/build';
// Which Phaser build was selected to develop the game.
//
// Available options:
// * .../phaser.js: The standard one, with both Arcade and P2 Physics.
// * .../custom/phaser-arcade-physics.js: Including only Arcade Physics.
// * .../custom/phaser-no-physics.js: No physics engines included.
//
// Note: Other features are missing in the 'no physics' build, like Tilemaps.
// If you're getting exceptions when trying to create these game objects,
// change to another build option listed above.
const PHASER = `${PHASER_BUILDS}/custom/phaser-arcade-physics.js`;
// Build output directories.
exports.dirs = {
build: BUILD,
dist: DIST
};
// File paths and glob patterns.
exports.files = {
// Finds this project static assets to be copied for distribution.
assets: `${STATIC}/**`,
// Finds the scripts to be compiled.
scripts: `${SRC}/**/*.js`,
// The selected Phaser script.
phaser: PHASER
};
// The Browserify settings.
exports.bundle = {
debug: true,
standalone: 'app',
entries: [`${SRC}/app.js`]
};
// The BrowserSync settings.
exports.server = {
// Settings for the development server.
dev: {
server: {
baseDir: [STATIC, BUILD],
routes: {
'/phaser.js': PHASER
}
},
ghostMode: false,
notify: false,
ui: false
},
// Settings for testing the application bundled for distribution. Used when
// running the `test-dist` npm script.
dist: {
server: DIST,
port: 8080,
ghostMode: false,
notify: false,
ui: false
}
};