Skip to content

Commit

Permalink
upgrade pomelo to 2.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasyni committed Jan 20, 2017
1 parent 3c0672a commit 9c2e9f2
Show file tree
Hide file tree
Showing 8 changed files with 195 additions and 3,955 deletions.
8 changes: 4 additions & 4 deletions game-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"version": "0.2.0",
"private": false,
"dependencies": {
"pomelo": "1.x",
"bearcat": "^0.4.29",
"crc": ">=0.0.1",
"pomelo": "^2.2.3",
"pomelo-collection": ">=0.1.0",
"pomelo-logger": "0.1.x",
"bearcat": "0.2.x"
"pomelo-logger": "0.1.x"
}
}
}
15 changes: 8 additions & 7 deletions web-server/public/js/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
__resources__["/app.js"] = {
meta: {mimetype: "application/javascript"},

meta: {
mimetype: "application/javascript"
},

data: function(exports, require, module, __filename, __dirname) {
var gameMsgHandler = require('msgHandler'); // server message handler
var Area = require('area');
Expand Down Expand Up @@ -91,8 +93,8 @@ __resources__["/app.js"] = {
return getArea().getCurPlayer();
}

function getResMgr(){
if(!resMgr){
function getResMgr() {
if (!resMgr) {
resMgr = new ResMgr();
}

Expand All @@ -104,7 +106,7 @@ __resources__["/app.js"] = {
* @param data {Object} The init data for area
* @api private
*/
function configData(data){
function configData(data) {
data.skch = skch;
data.gd = gd;
data.gv = gv;
Expand All @@ -130,5 +132,4 @@ __resources__["/app.js"] = {
exports.getCurPlayer = getCurPlayer;
exports.changeView = changeView;
}
};

};
2 changes: 1 addition & 1 deletion web-server/public/js/lib/pomeloclient.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
url += ':' + port;
}

socket = io.connect(url, {'force new connection': true, reconnect: true});
socket = io(url, {'force new connection': true, reconnect: true});

socket.on('connect', function(){
console.log('[pomeloclient.init] websocket connected!');
Expand Down
Loading

0 comments on commit 9c2e9f2

Please sign in to comment.