@angular/compiler-cli
Advanced tools
Comparing version 4.0.0-beta.2 to 4.0.0-beta.3
{ | ||
"name": "@angular/compiler-cli", | ||
"version": "4.0.0-beta.2", | ||
"version": "4.0.0-beta.3", | ||
"description": "Angular - the compiler CLI for Node.js", | ||
@@ -18,4 +18,4 @@ "main": "index.js", | ||
"typescript": "^2.0.2", | ||
"@angular/compiler": "4.0.0-beta.2", | ||
"@angular/core": "4.0.0-beta.2" | ||
"@angular/compiler": "4.0.0-beta.3", | ||
"@angular/core": "4.0.0-beta.3" | ||
}, | ||
@@ -22,0 +22,0 @@ "repository": { |
@@ -50,19 +50,21 @@ /** | ||
// List loadChildren of this single module. | ||
var staticSymbol = reflector.findDeclaration(modulePath, className, containingFile); | ||
var appStaticSymbol = reflector.findDeclaration(modulePath, className, containingFile); | ||
var ROUTES = reflector.findDeclaration(ROUTER_MODULE_PATH, ROUTER_ROUTES_SYMBOL_NAME); | ||
var lazyRoutes = _extractLazyRoutesFromStaticModule(staticSymbol, reflector, host, ROUTES); | ||
var routes = {}; | ||
lazyRoutes.forEach(function (lazyRoute) { | ||
var lazyRoutes = _extractLazyRoutesFromStaticModule(appStaticSymbol, reflector, host, ROUTES); | ||
var allLazyRoutes = lazyRoutes.reduce(function includeLazyRouteAndSubRoutes(allRoutes, lazyRoute) { | ||
var route = lazyRoute.routeDef.toString(); | ||
_assertRoute(routes, lazyRoute); | ||
routes[route] = lazyRoute; | ||
_assertRoute(allRoutes, lazyRoute); | ||
allRoutes[route] = lazyRoute; | ||
// StaticReflector does not support discovering annotations like `NgModule` on default | ||
// exports | ||
// Which means: if a default export NgModule was lazy-loaded, we can discover it, but, | ||
// we cannot parse its routes to see if they have loadChildren or not. | ||
if (!lazyRoute.routeDef.className) { | ||
return allRoutes; | ||
} | ||
var lazyModuleSymbol = reflector.findDeclaration(lazyRoute.absoluteFilePath, lazyRoute.routeDef.className || 'default'); | ||
var subRoutes = _extractLazyRoutesFromStaticModule(lazyModuleSymbol, reflector, host, ROUTES); | ||
// Populate the map using the routes we just found. | ||
subRoutes.forEach(function (subRoute) { | ||
_assertRoute(routes, subRoute); | ||
routes[subRoute.routeDef.toString()] = subRoute; | ||
}); | ||
}); | ||
return routes; | ||
return subRoutes.reduce(includeLazyRouteAndSubRoutes, allRoutes); | ||
}, {}); | ||
return allLazyRoutes; | ||
} | ||
@@ -154,3 +156,3 @@ exports.listLazyRoutesOfModule = listLazyRoutesOfModule; | ||
return routes.reduce(function (m, r) { | ||
if (r.loadChildren) { | ||
if (r.loadChildren && typeof r.loadChildren === 'string') { | ||
return m.concat(r.loadChildren); | ||
@@ -157,0 +159,0 @@ } |
@@ -18,3 +18,3 @@ /** | ||
*/ | ||
exports.VERSION = new core_1.Version('4.0.0-beta.2'); | ||
exports.VERSION = new core_1.Version('4.0.0-beta.3'); | ||
//# sourceMappingURL=version.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.2"]}}},{"__symbolic":"module","version":1,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.2"]}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.3"]}}},{"__symbolic":"module","version":1,"metadata":{"VERSION":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Version"},"arguments":["4.0.0-beta.3"]}}}] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140207
1238