Skip to content

Commit

Permalink
fix(@schematics/angular): generate app-shell options properly
Browse files Browse the repository at this point in the history
Options are in the "options" key.

Fix #10379
  • Loading branch information
hansl committed Jun 6, 2018
1 parent 797518e commit 4bc7c36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions packages/schematics/angular/app-shell/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,12 @@ function addAppShellConfigToWorkspace(options: AppShellOptions): Rule {
const workspacePath = getWorkspacePath(host);

const appShellTarget: JsonObject = {
browserTarget: `${options.clientProject}:build`,
serverTarget: `${options.clientProject}:server`,
route: options.route,
builder: '@angular-devkit/build-angular:app-shell',
options: {
browserTarget: `${options.clientProject}:build`,
serverTarget: `${options.clientProject}:server`,
route: options.route,
},
};

if (!workspace.projects[options.clientProject]) {
Expand Down
6 changes: 3 additions & 3 deletions packages/schematics/angular/app-shell/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ describe('App Shell Schematic', () => {
const content = tree.readContent(filePath);
const workspace = JSON.parse(content);
const target = workspace.projects.bar.architect['app-shell'];
expect(target.browserTarget).toEqual('bar:build');
expect(target.serverTarget).toEqual('bar:server');
expect(target.route).toEqual('shell');
expect(target.options.browserTarget).toEqual('bar:build');
expect(target.options.serverTarget).toEqual('bar:server');
expect(target.options.route).toEqual('shell');
});

it('should add router module to client app module', () => {
Expand Down

0 comments on commit 4bc7c36

Please sign in to comment.