Skip to content

Commit

Permalink
Make Cesium release server work on Node 12.
Browse files Browse the repository at this point in the history
While we still can't use Node 12 for Cesium development, this change is
to make sure Cesium release zips can actually work under Node 12.
  • Loading branch information
mramato committed Mar 2, 2020
1 parent 6048170 commit c276f02
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"files": [
"index.js",
"server.js",
"server.cjs",
"gulpfile.js",
"Source/Workers/transferTypedArrayTest.js"
],
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/index.html
/index.release.html
/launches
/server.js
/server.cjs
/Source/copyrightHeader.js
/Specs
/ThirdParty
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}\\server.js",
"program": "${workspaceRoot}\\server.cjs",
"cwd": "${workspaceRoot}"
},
{
Expand All @@ -18,4 +18,4 @@
"port": 5858
}
]
}
}
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ gulp.task('makeZipFile', gulp.series('release', function() {
'ThirdParty/**',
'favicon.ico',
'gulpfile.js',
'server.js',
'server.cjs',
'package.json',
'LICENSE.md',
'CHANGES.md',
Expand Down Expand Up @@ -460,7 +460,7 @@ function deployCesium(bucketName, uploadDirectory, cacheControl, done) {
'gulpfile.js',
'index.html',
'package.json',
'server.js',
'server.cjs',
'web.config',
'*.zip',
'*.tgz'
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"eslint": "^6.4.0",
"eslint-plugin-html": "^6.0.0",
"express": "^4.15.0",
"globby": "^10.0.0",
"globby": "^11.0.0",
"glsl-strip-comments": "^1.0.0",
"gulp": "^4.0.0",
"gulp-clean-css": "^4.2.0",
Expand Down Expand Up @@ -82,8 +82,8 @@
},
"scripts": {
"convertToModules": "gulp convertToModules",
"start": "node server.js",
"startPublic": "node server.js --public",
"start": "node server.cjs",
"startPublic": "node server.cjs --public",
"build": "gulp build",
"build-watch": "gulp build-watch",
"buildApps": "gulp buildApps",
Expand Down
2 changes: 1 addition & 1 deletion server.js → server.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
server.on('error', function (e) {
if (e.code === 'EADDRINUSE') {
console.log('Error: Port %d is already in use, select a different port.', argv.port);
console.log('Example: node server.js --port %d', argv.port + 1);
console.log('Example: node server.cjs --port %d', argv.port + 1);
} else if (e.code === 'EACCES') {
console.log('Error: This process does not have permission to listen on port %d.', argv.port);
if (argv.port < 1024) {
Expand Down

0 comments on commit c276f02

Please sign in to comment.