|
1 | 1 | import { Files } from './Files' |
2 | | -import { LernaConfig, NPM } from './Interfaces' |
| 2 | +import { NPM } from './Interfaces' |
3 | 3 | import { Log, Logger } from './Logger' |
4 | 4 |
|
5 | 5 | export class Project { |
@@ -55,31 +55,9 @@ export class Project { |
55 | 55 | } |
56 | 56 |
|
57 | 57 | private workspaces(npm: NPM): Promise<Project> { |
58 | | - /* |
59 | | - const lernafile = Files.join(this.path, 'lerna.json') |
60 | | -
|
61 | | - if (await Files.exists(lernafile)) { |
62 | | - this.log.debug('lerna-packages', this.path) |
63 | | - return this.lerna(lernafile, this) |
64 | | - } |
65 | | - */ |
66 | 58 | return this.yarn(this) |
67 | 59 | } |
68 | 60 |
|
69 | | - private async lerna(filepath: string, project: Project): Promise<Project> { |
70 | | - const lerna = await Files.json<LernaConfig>(filepath) |
71 | | - if (lerna.packages && lerna.useWorkspaces) { |
72 | | - lerna.packages.forEach(async workspace => { |
73 | | - const workspaceName = workspace.substring(0, workspace.indexOf('/*')) |
74 | | - const workspacePath = Files.join(project.path, workspaceName) |
75 | | - const children = await this.loadProjects(workspacePath) |
76 | | - children.forEach(child => this.children.push(child)) |
77 | | - this.log.debug('lerna-package', workspaceName) |
78 | | - }) |
79 | | - } |
80 | | - return this |
81 | | - } |
82 | | - |
83 | 61 | private async yarn(project: Project): Promise<Project> { |
84 | 62 | const npm = await this.npm |
85 | 63 | if (npm.workspaces) { |
|
0 commit comments