Skip to content

Commit d364b6e

Browse files
committed
Address feedback
1 parent 281b732 commit d364b6e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tools/gulp/tasks/release.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ const themingEntryPointPath = join(COMPONENTS_DIR, 'core', 'theming', '_all-them
2727
// Output path for the scss theming bundle.
2828
const themingBundlePath = join(releasePath, '_theming.scss');
2929

30-
// Glob that matches all files that might be imported multiple times.
31-
// Necessary for deduping inside of scss-bundle.
32-
const themingBundleDedupeGlob = join(COMPONENTS_DIR, '**/*.scss');
30+
// Matches all SCSS files in the library.
31+
const allScssGlob = join(COMPONENTS_DIR, '**/*.scss');
3332

3433
// Matches all pre-built theme css files
3534
const prebuiltThemeGlob = join(DIST_MATERIAL, '**/theming/prebuilt/*.css');
@@ -51,7 +50,10 @@ task(':package:theming', [':bundle:theming-scss'], () => {
5150

5251
/** Bundles all scss requires for theming into a single scss file in the root of the package. */
5352
task(':bundle:theming-scss', () => {
54-
new Bundler().Bundle(themingEntryPointPath, [themingBundleDedupeGlob]).then(result => {
53+
// Instantiates the SCSS bundler and bundles all imports of the specified entry point SCSS file.
54+
// A glob of all SCSS files in the library will be passed to the bundler. The bundler takes an
55+
// array of globs, which will match SCSS files that will be only included once in the bundle.
56+
new Bundler().Bundle(themingEntryPointPath, [allScssGlob]).then(result => {
5557
writeFileSync(themingBundlePath, result.bundledContent);
5658
});
5759
});

0 commit comments

Comments
 (0)