mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-08-04 21:53:14 +00:00
minor changes
This commit is contained in:
parent
d98cb73f69
commit
79f2f34a79
5 changed files with 63 additions and 21 deletions
|
|
@ -53,6 +53,8 @@
|
|||
|
||||
/* compitability with old versions of node */
|
||||
exports.fs.exists = exports.fs.exists || exports.path.exists;
|
||||
//exports.fs.watch = isWin32 ? fs.watch : linuxWatch;
|
||||
|
||||
|
||||
/* Needed Modules */
|
||||
exports.util = Util = require(LIBDIR + 'util'),
|
||||
|
|
@ -60,7 +62,6 @@
|
|||
exports.zlib = zlib = mrequire('zlib'),
|
||||
|
||||
/* Main Information */
|
||||
exports.config = jsonrequire('config');
|
||||
exports.modules = jsonrequire('modules');
|
||||
exports.ext = ext = jsonrequire('ext');
|
||||
exports.mainpackage = rootrequire('package');
|
||||
|
|
@ -240,4 +241,12 @@
|
|||
return lQuery;
|
||||
}
|
||||
|
||||
|
||||
function linuxWatch(pFile, pCallBack){
|
||||
fs.watchFile(pFile, function(pCurr, pPrev){
|
||||
if(pCurr.mtime !== pPrev.mtime)
|
||||
Util.exec(pCallBack);
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue