File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const ngJson = readJsonFromVisual('angular.json');
88const projectName = env . VISUAL_NAME ! ;
99const visualRoot = ngJson . projects [ projectName ] . root ;
1010const sourceRoot = ngJson . projects [ projectName ] . sourceRoot ;
11- const pkgJson = readJsonFromVisual ( visualRoot + ' /package.json' ) ;
11+ const pkgJson = readJsonFromVisual ( ` ${ visualRoot } /package.json` ) ;
1212const exposes = { } ;
1313
1414const getDirectories = ( source : string ) =>
@@ -17,8 +17,10 @@ const getDirectories = (source: string) =>
1717 . map ( dirent => dirent . name ) ;
1818
1919getDirectories ( sourceRoot ) . forEach ( dir => {
20- if ( existsSync ( `${ sourceRoot } /${ dir } /manifest.json` ) ) {
21- const exposedModule = capitalize ( camelCase ( dir ) ) ;
20+ const manifestPath = `${ sourceRoot } /${ dir } /manifest.json` ;
21+ if ( existsSync ( manifestPath ) ) {
22+ const manifestJson = readJsonFromVisual ( manifestPath ) ;
23+ const exposedModule = capitalize ( camelCase ( manifestJson . name ) ) ;
2224 exposes [ exposedModule ] = `./${ sourceRoot } /${ dir } ` ;
2325 }
2426} ) ;
You can’t perform that action at this time.
0 commit comments