Skip to content

Commit 198acee

Browse files
committed
feat: modernize all project dependencies
Major Updates: - Upgrade Phaser 2.6.2 → Phaser CE 2.20.2 (actively maintained community edition) - Update Node.js 8.17.0 → 22.21.1 (latest LTS) - Upgrade Gulp 4.0.2 → 5.0.1 - Update Babel core and preset-env to 7.28.6 Dev Dependency Updates: - browser-sync: 2.29.3 → 3.0.4 - browserify: 17.0.0 → 17.0.1 - del: 6.1.1 → 8.0.1 - prettier: 3.0.3 → 3.8.0 - yargs: 17.7.2 → 18.0.0 - Replace deprecated gulp-util with fancy-log 2.0.0 Configuration Changes: - Update .nvmrc to Node 22.21.1 - Update package.json engines to require Node >=18.0.0 - Modernize Babel config to target modern browsers, drop IE11 support - Update gulpfile.js to use fancy-log instead of gulp-util - Fix yargs argv parsing for v18+ compatibility - Update Phaser path to use phaser-ce build directory All changes tested and verified. Game builds and runs successfully.
1 parent 2e639da commit 198acee

File tree

5 files changed

+1785
-4836
lines changed

5 files changed

+1785
-4836
lines changed

.babelrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
{
66
"targets": {
77
"browsers": [
8-
"last 2 versions",
9-
"ie >= 11"
8+
"defaults",
9+
"not dead",
10+
"not IE 11"
1011
]
1112
}
1213
}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.17.0
1+
22.21.1

gulpfile.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const fs = require("fs");
22
const path = require("path");
33
const gulp = require("gulp");
4-
const argv = require("yargs").argv;
5-
const gutil = require("gulp-util");
4+
const argv = require("yargs")(process.argv.slice(2)).argv;
5+
const log = require("fancy-log");
66
const source = require("vinyl-source-stream");
77
const buffer = require("gulp-buffer");
88
const uglify = require("gulp-uglify");
@@ -15,7 +15,7 @@ const browserSync = require("browser-sync");
1515
/**
1616
* Using different folders/file names? Change these constants:
1717
*/
18-
const PHASER_PATH = "./node_modules/phaser/build/";
18+
const PHASER_PATH = "./node_modules/phaser-ce/build/";
1919
const BUILD_PATH = "./build";
2020
const SCRIPTS_PATH = BUILD_PATH + "/scripts";
2121
const SOURCE_PATH = "./src";
@@ -37,9 +37,9 @@ function isProduction() {
3737
*/
3838
function logBuildMode() {
3939
if (isProduction()) {
40-
gutil.log(gutil.colors.green("Running production build..."));
40+
log.info("Running production build...");
4141
} else {
42-
gutil.log(gutil.colors.yellow("Running development build..."));
42+
log.warn("Running development build...");
4343
}
4444
}
4545

@@ -110,7 +110,7 @@ function build() {
110110
.transform(babelify)
111111
.bundle()
112112
.on("error", function(error) {
113-
gutil.log(gutil.colors.red("[Build Error]", error.message));
113+
log.error("[Build Error]", error.message);
114114
this.emit("end");
115115
})
116116
.pipe(gulpif(!isProduction(), exorcist(sourcemapPath)))

0 commit comments

Comments
 (0)