Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.

Commit

Permalink
fix(@schematics/angular): fix styles field of angular.json in applica…
Browse files Browse the repository at this point in the history
…tion schematic
  • Loading branch information
FrozenPandaz authored and hansl committed May 7, 2018
1 parent fe12251 commit 6bb0c78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function addAppToWorkspaceFile(options: ApplicationOptions, workspace: Workspace
tsConfig: `${rootFilesRoot}tsconfig.spec.json`,
karmaConfig: `${rootFilesRoot}karma.conf.js`,
styles: [
`${projectRoot}styles.${options.style}`,
`${projectRoot}src/styles.${options.style}`,
],
scripts: [],
assets: [
Expand Down
8 changes: 8 additions & 0 deletions packages/schematics/angular/application/index_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,14 @@ describe('Application Schematic', () => {
expect(buildOpt.main).toEqual('src/main.ts');
expect(buildOpt.polyfills).toEqual('src/polyfills.ts');
expect(buildOpt.tsConfig).toEqual('src/tsconfig.app.json');

const testOpt = prj.architect.test.options;
expect(testOpt.main).toEqual('src/test.ts');
expect(testOpt.tsConfig).toEqual('src/tsconfig.spec.json');
expect(testOpt.karmaConfig).toEqual('src/karma.conf.js');
expect(testOpt.styles).toEqual([
'src/styles.css',
]);
});

it('should set the relative tsconfig paths', () => {
Expand Down

0 comments on commit 6bb0c78

Please sign in to comment.