diff --git a/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts b/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts index f6219f7341b0..7c1868764955 100644 --- a/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts +++ b/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts @@ -67,7 +67,7 @@ describe('AppShell Builder', () => { }) export class AppModule { } `, - 'src/app/app.server.module.ts': ` + 'src/app/app.module.server.ts': ` import { NgModule } from '@angular/core'; import { ServerModule } from '@angular/platform-server'; diff --git a/packages/angular_devkit/build_angular/test/hello-world-app/src/app/app.server.module.ts b/packages/angular_devkit/build_angular/test/hello-world-app/src/app/app.module.server.ts similarity index 100% rename from packages/angular_devkit/build_angular/test/hello-world-app/src/app/app.server.module.ts rename to packages/angular_devkit/build_angular/test/hello-world-app/src/app/app.module.server.ts diff --git a/packages/angular_devkit/build_angular/test/hello-world-app/src/main.server.ts b/packages/angular_devkit/build_angular/test/hello-world-app/src/main.server.ts index 4448f40d8a49..7be4b358b110 100644 --- a/packages/angular_devkit/build_angular/test/hello-world-app/src/main.server.ts +++ b/packages/angular_devkit/build_angular/test/hello-world-app/src/main.server.ts @@ -6,4 +6,4 @@ * found in the LICENSE file at https://angular.io/license */ -export { AppServerModule } from './app/app.server.module'; +export { AppServerModule } from './app/app.module.server'; diff --git a/packages/schematics/angular/app-shell/index_spec.ts b/packages/schematics/angular/app-shell/index_spec.ts index 35fd3425382e..a0db5b305466 100644 --- a/packages/schematics/angular/app-shell/index_spec.ts +++ b/packages/schematics/angular/app-shell/index_spec.ts @@ -56,7 +56,7 @@ describe('App Shell Schematic', () => { it('should add a universal app', async () => { const tree = await schematicRunner.runSchematic('app-shell', defaultOptions, appTree); - const filePath = '/projects/bar/src/app/app.server.module.ts'; + const filePath = '/projects/bar/src/app/app.module.server.ts'; expect(tree.exists(filePath)).toEqual(true); }); @@ -145,7 +145,7 @@ describe('App Shell Schematic', () => { it('should add router imports to server module', async () => { const tree = await schematicRunner.runSchematic('app-shell', defaultOptions, appTree); - const filePath = '/projects/bar/src/app/app.server.module.ts'; + const filePath = '/projects/bar/src/app/app.module.server.ts'; const content = tree.readContent(filePath); expect(content).toMatch(/import { Routes, RouterModule } from '@angular\/router';/); }); @@ -158,21 +158,21 @@ describe('App Shell Schematic', () => { appTree.overwrite('angular.json', JSON.stringify(workspace, undefined, 2)); tree = await schematicRunner.runSchematic('app-shell', defaultOptions, tree); - const filePath = '/projects/bar/src/app/app.server.module.ts'; + const filePath = '/projects/bar/src/app/app.module.server.ts'; const content = tree.readContent(filePath); expect(content).toMatch(/import { Routes, RouterModule } from '@angular\/router';/); }); it('should define a server route', async () => { const tree = await schematicRunner.runSchematic('app-shell', defaultOptions, appTree); - const filePath = '/projects/bar/src/app/app.server.module.ts'; + const filePath = '/projects/bar/src/app/app.module.server.ts'; const content = tree.readContent(filePath); expect(content).toMatch(/const routes: Routes = \[/); }); it('should import RouterModule with forRoot', async () => { const tree = await schematicRunner.runSchematic('app-shell', defaultOptions, appTree); - const filePath = '/projects/bar/src/app/app.server.module.ts'; + const filePath = '/projects/bar/src/app/app.module.server.ts'; const content = tree.readContent(filePath); expect(content).toMatch( /const routes: Routes = \[ { path: 'shell', component: AppShellComponent }\];/, @@ -183,7 +183,7 @@ describe('App Shell Schematic', () => { it('should create the shell component', async () => { const tree = await schematicRunner.runSchematic('app-shell', defaultOptions, appTree); expect(tree.exists('/projects/bar/src/app/app-shell/app-shell.component.ts')).toBe(true); - const content = tree.readContent('/projects/bar/src/app/app.server.module.ts'); + const content = tree.readContent('/projects/bar/src/app/app.module.server.ts'); expect(content).toMatch(/app-shell\.component/); }); diff --git a/packages/schematics/angular/app-shell/schema.json b/packages/schematics/angular/app-shell/schema.json index 896663e7d6b9..3f688b564fd7 100644 --- a/packages/schematics/angular/app-shell/schema.json +++ b/packages/schematics/angular/app-shell/schema.json @@ -33,7 +33,7 @@ "rootModuleFileName": { "type": "string", "description": "The name of the root module file", - "default": "app.server.module.ts" + "default": "app.module.server.ts" }, "rootModuleClassName": { "type": "string", diff --git a/packages/schematics/angular/universal/index_spec.ts b/packages/schematics/angular/universal/index_spec.ts index 61582a64f804..c2dbf575fc56 100644 --- a/packages/schematics/angular/universal/index_spec.ts +++ b/packages/schematics/angular/universal/index_spec.ts @@ -67,7 +67,7 @@ describe('Universal Schematic', () => { it('should create a root module file', async () => { const tree = await schematicRunner.runSchematic('universal', defaultOptions, appTree); - const filePath = '/projects/bar/src/app/app.server.module.ts'; + const filePath = '/projects/bar/src/app/app.module.server.ts'; expect(tree.exists(filePath)).toEqual(true); }); @@ -76,7 +76,7 @@ describe('Universal Schematic', () => { const filePath = '/projects/bar/src/main.server.ts'; expect(tree.exists(filePath)).toEqual(true); const contents = tree.readContent(filePath); - expect(contents).toMatch(/export { AppServerModule } from '\.\/app\/app\.server\.module'/); + expect(contents).toMatch(/export { AppServerModule } from '\.\/app\/app\.module\.server'/); }); it('should create a tsconfig file for the workspace project', async () => { @@ -211,7 +211,7 @@ describe('Universal Schematic', () => { defaultStandaloneOptions, appTree, ); - const filePath = '/projects/baz/src/app/app.server.module.ts'; + const filePath = '/projects/baz/src/app/app.module.server.ts'; expect(tree.exists(filePath)).toEqual(false); }); diff --git a/packages/schematics/angular/universal/schema.json b/packages/schematics/angular/universal/schema.json index 2b41f7fbff7c..88e73027aade 100644 --- a/packages/schematics/angular/universal/schema.json +++ b/packages/schematics/angular/universal/schema.json @@ -30,7 +30,7 @@ "type": "string", "format": "path", "description": "The name of the root NgModule file.", - "default": "app.server.module.ts" + "default": "app.module.server.ts" }, "rootModuleClassName": { "type": "string",