Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

fix(@schematics/angular): Fix usage of sourceRoot configuration value #990

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

Brocco
Copy link
Contributor

@Brocco Brocco commented May 30, 2018

@Brocco Brocco requested a review from hansl as a code owner May 30, 2018 22:36
options.path = `/${project.root}/src/${projectDirName}`;
options.path = project.sourceRoot
? `/${project.sourceRoot}/${projectDirName}`
: `/${project.root}/${project.sourceRoot || 'src'}/${projectDirName}`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code section inside this if block appears to be repeated in most schematics. It probably should be pulled out and introduced as a utility function to simplify any changes/fixes in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea... refactored.

@Brocco Brocco force-pushed the custom-source-root branch from 1a16de7 to 4a2bcd9 Compare May 31, 2018 15:52
@hansl hansl merged commit 524c7cf into angular:master Jun 5, 2018
@Brocco Brocco deleted the custom-source-root branch June 5, 2018 21:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng generate error
4 participants