Added deCache support
This commit is contained in:
parent
4b6d913ef9
commit
07a26a2568
@ -13,7 +13,7 @@ Package.prototype.rootNS = function( name, path )
|
||||
rootNS[ name ] = fs.realpathSync( path ) + "/";
|
||||
};
|
||||
|
||||
Package.prototype.load = function( _class )
|
||||
Package.prototype.load = function( _class, deCache )
|
||||
{
|
||||
var fSep = _class.indexOf( "." );
|
||||
var nsdomain = _class.substr( 0, fSep );
|
||||
@ -24,6 +24,10 @@ Package.prototype.load = function( _class )
|
||||
var lClass = require( file );
|
||||
// TODO: Implements filewatcher
|
||||
|
||||
if( deCache )
|
||||
{
|
||||
delete require.cache[ require.resolve( file ) ];
|
||||
}
|
||||
return lClass;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user