Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(@angular/cli): fix schema.json description for `stylePreprocessorOptions.includePaths` #17156

Conversation

@spenceryue
Copy link

@spenceryue spenceryue commented Mar 6, 2020

Previously, the schema.json description for stylePreprocessorOptions > includePaths specified that paths were resolved with respect to "project root", but this should read "workspace root".

Starting at styles.ts#L81,

includePaths.push(path.resolve(root, includePath)),

each user-specified include path is resolved with respect to root, declared at styles.ts#L27

const { root, buildOptions } = wco;

where wco is passed in from the containing function, getStylesConfig, called at index.ts#L138

getStylesConfig(wco),

inside the webpackPartialGenerator callback, which was passed to generateBrowserWebpackConfigFromContext at index.ts#L154

return generateBrowserWebpackConfigFromContext(options, context, webpackPartialGenerator, host);

which in turn passed the callback to generateWebpackConfig, which calls the callback at webpack-browser-config.ts#L104

const partials = webpackPartialGenerator(wco);

with the wco object declared at webpack-browser-config.ts#L91, which has its root field set to workspaceRoot

root: workspaceRoot,

which was passed in from generateBrowserWebpackConfigFromContext at webpack-browser-config.ts#L222 as

getSystemPath(workspaceRoot),

where workspaceRoot was declared at webpack-browser-config.ts#L204 as

const workspaceRoot = normalize(context.workspaceRoot);

using the context received from the caller, buildBrowserWebpackConfigFromContext, whose own caller, setup, passed in the context it received from setupWebpackBrowser which declares the type of context to be BuilderContext, whose definition includes a comment for the workspaceRoot field at api.ts#L146,

The absolute workspace root of this run.

motivating this PR.

It would probably also be helpful to also mention the include path resolution strategy in the relevant section of the docs.

…ons` > `includePaths`
@googlebot
Copy link

@googlebot googlebot commented Mar 6, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no label Mar 6, 2020
@spenceryue spenceryue changed the title docs(@angular/cli): fix schema description for `stylePreprocessorOptions` > `includePaths` docs(@angular/cli): fix schema.json description for stylePreprocessorOptions.includePaths Mar 6, 2020
@spenceryue spenceryue changed the title docs(@angular/cli): fix schema.json description for stylePreprocessorOptions.includePaths docs(@angular/cli): fix schema.json description for `stylePreprocessorOptions.includePaths` Mar 6, 2020
@spenceryue
Copy link
Author

@spenceryue spenceryue commented Mar 6, 2020

@googlebot I signed it!

@googlebot
Copy link

@googlebot googlebot commented Mar 6, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@spenceryue
Copy link
Author

@spenceryue spenceryue commented Mar 6, 2020

@googlebot I signed it!

@googlebot
Copy link

@googlebot googlebot commented Mar 6, 2020

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.