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

build: dedupe theming scss bundle #4174

Merged
merged 2 commits into from
Apr 21, 2017

Conversation

devversion
Copy link
Member

  • Updates to a more recent version of SCSS-bundle that has support for deduping. The dedupe process is very naive and only disallows importing a file multiple times.
  • Switches to the programmatic API of scss-bundle
  • Removes unused functions and imports / leftovers.

Fixes #3931

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 20, 2017
@@ -32,6 +27,10 @@ const themingEntryPointPath = join(COMPONENTS_DIR, 'core', 'theming', '_all-them
// Output path for the scss theming bundle.
const themingBundlePath = join(releasePath, '_theming.scss');

// Glob that matches all files that might be imported multiple times.
// Necessary for deduping inside of scss-bundle.
const themingBundleDedupeGlob = join(COMPONENTS_DIR, '**/*.scss');
Copy link
Member

Choose a reason for hiding this comment

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

Should be named for what is it rather than how it's used, e.g., allScssGlob

Copy link
Member Author

@devversion devversion Apr 20, 2017

Choose a reason for hiding this comment

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

I named it themingBundleDedupeGlob because I wanted to make it clear that this will be the array that holds the files that might need deduping. Changed it because the comment below explains it then.

], {silentStdout: true}
));
task(':bundle:theming-scss', () => {
new Bundler().Bundle(themingEntryPointPath, [themingBundleDedupeGlob]).then(result => {
Copy link
Member

Choose a reason for hiding this comment

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

Could you comment on what the arguments are here since it's not really clear from the call site?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

* Updates to a more recent version of SCSS-bundle that has support for deduping. The dedupe process is very naive and only disallows importing a file multiple times.
* Switches to the programmatic API of `scss-bundle`
* Removes unused functions and imports / leftovers.

Fixes angular#3931
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Apr 20, 2017
@kara kara merged commit 7c81698 into angular:master Apr 21, 2017
@devversion devversion deleted the build/dedupe-theming-scss branch November 11, 2017 10:20
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Theming mixins/variables massively duplicated in release output
4 participants