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

feat(compiler-cli): resolve generated Sass/Less files to .css inputs #28166

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
7 participants
@alexeagle
Copy link
Contributor

alexeagle commented Jan 15, 2019

Users might have run the CSS Preprocessor tool before the Angular
compiler. For example, we do it that way under Bazel. This means that
the design-time reference is different from the compile-time one - the
input to the Angular compiler is a plain .css file.

We assume that the preprocessor does a trivial 1:1 mapping using the same
basename with a different extension.

@alexeagle alexeagle requested a review from angular/fw-compiler as a code owner Jan 15, 2019

@googlebot googlebot added the cla: yes label Jan 15, 2019

@alxhub

alxhub approved these changes Jan 15, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 15, 2019

@@ -19,6 +19,7 @@ import {DTS, GENERATED_FILES, isInRootDir, relativeToRootDirs} from './util';

const NODE_MODULES_PACKAGE_NAME = /node_modules\/((\w|-|\.)+|(@(\w|-|\.)+\/(\w|-|\.)+))/;
const EXT = /(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/;
const CSS_PREPROCESSOR_EXT = /(\.scss|\.less)$/;

This comment has been minimized.

@alfaproject

alfaproject Jan 15, 2019

Contributor

Stylus is quite popular too: .styl

This comment has been minimized.

@alexeagle

alexeagle Jan 15, 2019

Author Contributor

I'm handling the ones that the CLI offers in ng new. But I don't see any harm in adding more common extensions - thanks!

This comment has been minimized.

@alxhub

alxhub Jan 16, 2019

Contributor

Ideally eventually these would be configurable, or we should just always chop a non .css extension off and look for an equivalent .css?

feat(compiler-cli): resolve generated Sass/Less files to .css inputs
Users might have run the CSS Preprocessor tool *before* the Angular
compiler. For example, we do it that way under Bazel. This means that
the design-time reference is different from the compile-time one - the
input to the Angular compiler is a plain .css file.

We assume that the preprocessor does a trivial 1:1 mapping using the same
basename with a different extension.

@alexeagle alexeagle force-pushed the alexeagle:scss_resolve branch from 51b2cbb to 9b45d65 Jan 15, 2019

@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Jan 15, 2019

@kyliau kyliau referenced this pull request Jan 15, 2019

Closed

feat(bazel): Add support for SASS #28167

4 of 14 tasks complete

@kyliau kyliau added the comp: bazel label Jan 16, 2019

@ngbot ngbot bot added this to the needsTriage milestone Jan 16, 2019

@kyliau kyliau removed the comp: bazel label Jan 16, 2019

@ngbot ngbot bot removed this from the needsTriage milestone Jan 16, 2019

@alippai

This comment has been minimized.

Copy link
Contributor

alippai commented Jan 17, 2019

@alexeagle: talking about the css preprocessing, what do you think of #25382 ?

@alxhub alxhub closed this in a58fd21 Jan 18, 2019

alxhub added a commit that referenced this pull request Jan 18, 2019

feat(compiler-cli): resolve generated Sass/Less files to .css inputs (#…
…28166)

Users might have run the CSS Preprocessor tool *before* the Angular
compiler. For example, we do it that way under Bazel. This means that
the design-time reference is different from the compile-time one - the
input to the Angular compiler is a plain .css file.

We assume that the preprocessor does a trivial 1:1 mapping using the same
basename with a different extension.

PR Close #28166

ngfelixl added a commit to ngfelixl/angular that referenced this pull request Jan 28, 2019

feat(compiler-cli): resolve generated Sass/Less files to .css inputs (a…
…ngular#28166)

Users might have run the CSS Preprocessor tool *before* the Angular
compiler. For example, we do it that way under Bazel. This means that
the design-time reference is different from the compile-time one - the
input to the Angular compiler is a plain .css file.

We assume that the preprocessor does a trivial 1:1 mapping using the same
basename with a different extension.

PR Close angular#28166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.