minor changes

This commit is contained in:
coderaiser 2013-02-22 11:18:19 -05:00
parent d98cb73f69
commit 79f2f34a79
5 changed files with 63 additions and 21 deletions

View file

@ -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);
});
}
})();