Skip to content

Commit 5154997

Browse files
SchnWalterfilipesilva
authored andcommitted
refactor(@schematics/angular): remove unused code
1 parent 83c94f9 commit 5154997

File tree

3 files changed

+1
-112
lines changed

3 files changed

+1
-112
lines changed

packages/schematics/angular/utility/project-targets.ts

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import { SchematicsException, Tree } from '@angular-devkit/schematics';
10-
import { getProject, isWorkspaceProject } from './project';
11-
import { WorkspaceProject, WorkspaceSchema, WorkspaceTargets } from './workspace-models';
12-
13-
export function getProjectTargets(project: WorkspaceProject): WorkspaceTargets;
14-
export function getProjectTargets(
15-
workspaceOrHost: WorkspaceSchema | Tree,
16-
projectName: string,
17-
): WorkspaceTargets;
18-
export function getProjectTargets(
19-
projectOrHost: WorkspaceProject | Tree | WorkspaceSchema,
20-
projectName = '',
21-
): WorkspaceTargets {
22-
const project = isWorkspaceProject(projectOrHost)
23-
? projectOrHost
24-
: getProject(projectOrHost, projectName);
25-
26-
const projectTargets = project.targets || project.architect;
27-
if (!projectTargets) {
28-
throw new Error('Project target not found.');
29-
}
30-
31-
return projectTargets;
32-
}
9+
import { SchematicsException } from '@angular-devkit/schematics';
3310

3411
export function targetBuildNotFoundError(): SchematicsException {
3512
return new SchematicsException(`Project target "build" not found.`);

packages/schematics/angular/utility/project.ts

Lines changed: 0 additions & 48 deletions
This file was deleted.

packages/schematics/angular/utility/project_spec.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)