mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 02:29:23 +00:00
refactored
This commit is contained in:
parent
428d9492ef
commit
7ffb00a984
6 changed files with 141 additions and 137 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/* module make possible connectoin thrue socket.io on a client */
|
||||
var CloudCommander, DOM, Util, io;
|
||||
(function(CloudCmd, DOM, Util){
|
||||
var CloudCommander, Util, DOM, io;
|
||||
(function(CloudCmd, Util, DOM, io){
|
||||
'use strict';
|
||||
|
||||
var Messages = [],
|
||||
|
|
@ -46,7 +46,7 @@ var CloudCommander, DOM, Util, io;
|
|||
},
|
||||
|
||||
onerror : function(){
|
||||
console.log('could not connect to socket.io\n'+
|
||||
Util.log('could not connect to socket.io\n'+
|
||||
'npm i socket.io');
|
||||
}
|
||||
});
|
||||
|
|
@ -62,6 +62,7 @@ var CloudCommander, DOM, Util, io;
|
|||
if(lTerm){
|
||||
var lStdout,
|
||||
lStderr;
|
||||
|
||||
if(Messages.length){
|
||||
/* show oll msg from buffer */
|
||||
for(var i = 0, n = Messages.length; i < n; i++){
|
||||
|
|
@ -98,9 +99,10 @@ var CloudCommander, DOM, Util, io;
|
|||
Messages.push(pMsg);
|
||||
lResult = false;
|
||||
}
|
||||
console.log(pMsg);
|
||||
|
||||
Util.log(pMsg);
|
||||
|
||||
return lResult;
|
||||
}
|
||||
|
||||
})(CloudCommander, DOM, Util);
|
||||
})(CloudCommander, Util, DOM, io);
|
||||
Loading…
Add table
Add a link
Reference in a new issue