Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions packages/schematics/angular/app-shell/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
noop,
schematic,
} from '@angular-devkit/schematics';
import { findBootstrapApplicationCall } from '../private/standalone';
import * as ts from '../third_party/github.com/Microsoft/TypeScript/lib/typescript';
import {
addImportToModule,
Expand All @@ -29,7 +28,8 @@ import {
} from '../utility/ast-utils';
import { applyToUpdateRecorder } from '../utility/change';
import { getAppModulePath, isStandaloneApp } from '../utility/ng-ast-utils';
import { getMainFilePath } from '../utility/standalone/util';
import { findAppConfig } from '../utility/standalone/app_config';
import { findBootstrapApplicationCall, getMainFilePath } from '../utility/standalone/util';
import { getWorkspace, updateWorkspace } from '../utility/workspace';
import { Builders } from '../utility/workspace-models';
import { Schema as AppShellOptions } from './schema';
Expand Down Expand Up @@ -89,18 +89,16 @@ function getComponentTemplate(host: Tree, compPath: string, tmplInfo: TemplateIn
}

function getBootstrapComponentPath(host: Tree, mainPath: string): string {
const mainSource = getSourceFile(host, mainPath);
const bootstrapAppCall = findBootstrapApplicationCall(mainSource);

let bootstrappingFilePath: string;
let bootstrappingSource: ts.SourceFile;
let componentName: string;

if (bootstrapAppCall) {
if (isStandaloneApp(host, mainPath)) {
// Standalone Application
componentName = bootstrapAppCall.arguments[0].getText();
const bootstrapCall = findBootstrapApplicationCall(host, mainPath);
componentName = bootstrapCall.arguments[0].getText();
bootstrappingFilePath = mainPath;
bootstrappingSource = mainSource;
bootstrappingSource = getSourceFile(host, mainPath);
} else {
// NgModule Application
const modulePath = getAppModulePath(host, mainPath);
Expand Down
3 changes: 1 addition & 2 deletions packages/schematics/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"./utility": "./utility/index.js",
"./utility/*": "./utility/*.js",
"./migrations/migration-collection.json": "./migrations/migration-collection.json",
"./*": "./*.js",
"./private/components": "./private/components.js"
"./*": "./*.js"
},
"schematics": "./collection.json",
"dependencies": {
Expand Down
15 changes: 0 additions & 15 deletions packages/schematics/angular/private/components.ts

This file was deleted.

Loading