Added zlib, fixed wildcard import ignoring namespaces

This commit is contained in:
2017-10-26 16:17:17 +08:00
parent 6e05b2d5c1
commit 7ab3fa333e
16 changed files with 149 additions and 28 deletions
+9 -4
View File
@@ -309,13 +309,13 @@ __import = __import || function( ns, noCache )
{
if( wildcard && j[0] == EX_CLASS )
{
nsObj[ i ] = j[1];
__const( nsObj, i, j[1] );
}
else if( j[0] == EX_FUNC )
{
nsObj[ i ] = j[1];
__const( nsObj, i, j[1] );
}
else if( j[0] == EX_CONST )
else if( j[0] == EX_CONST )
{
Object.defineProperty( nsObj, i, {
get: function() {
@@ -326,7 +326,7 @@ __import = __import || function( ns, noCache )
}.bind( { p: i } )
});
}
else if( j[0] == EX_VAR )
else if( j[0] == EX_VAR )
{
Object.defineProperty( nsObj, i, {
get: function() {
@@ -347,6 +347,11 @@ __import = __import || function( ns, noCache )
});
}
}
// import the namespace
else if( wildcard && j.__TRIGGERS )
{
__const( nsObj, i, __import( nss + "." + i ) );
}
}
_cacheIMP[ ns ] = nsObj;