Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit d121e25

Browse files
committed
fix(grid-generator): Change rootPath
1 parent 5061d89 commit d121e25

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/generators/grid.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ export class GridGenerator extends Base {
4141
customOptions && customOptions.project.libsConfigs[1].shortName : 'web';
4242
let coreFolder =
4343
(customOptions && customOptions.project.libsConfigs[0] && customOptions &&
44-
customOptions.project.libsConfigs[0].name) ?
45-
customOptions && customOptions.project.libsConfigs[0].name : 'core';
44+
customOptions.project.libsConfigs[0].rootPath) ?
45+
customOptions && customOptions.project.libsConfigs[0].rootPath : 'core';
4646
let platformFolder =
4747
(customOptions && customOptions.project.libsConfigs[1] && customOptions &&
48-
customOptions.project.libsConfigs[1].name) ?
49-
customOptions && customOptions.project.libsConfigs[1].name : 'web';
48+
customOptions.project.libsConfigs[1].rootPath) ?
49+
customOptions && customOptions.project.libsConfigs[1].rootPath : 'web';
5050
let pkField: string = 'id';
5151
let fields: string[] = [
5252
'name',

src/lib/project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class Project extends Base {
2424
(this.agularCliJson.apps ? this.agularCliJson.apps : []).
2525
filter((app: any) => app.appRoot === '').
2626
map((lib: any) => {
27-
lib.shortName = lib.root.split('/').reverse()[2];
27+
lib.shortName = path.basename(path.dirname(lib.root));
2828
lib.rootPath = path.resolve(this.rootFolder + '/' + _.trimStart(lib.root, './') + '/../');
2929
return lib;
3030
});

0 commit comments

Comments
 (0)