Skip to content

Commit

Permalink
fix(build): exclusion of table component when tab is active
Browse files Browse the repository at this point in the history
If there is still a table.css present in dist/components, it will be included in semantic.css.

This is caused by a collision in the globbing mechanism: 'tab' is included in the word 'table', so table.css is included in the package task.

Fixes #2118
  • Loading branch information
hugopeek authored Sep 24, 2021
1 parent 5f0c9f1 commit 2f5aacb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tasks/build/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ function pack(type, compress) {
concatenatedCSS = compress ? filenames.concatenatedMinifiedCSS : filenames.concatenatedCSS;
}

return gulp.src(output.uncompressed + '/**/' + globs.components + ignoredGlobs)
let src = output.uncompressed + '/**/' + globs.components + ignoredGlobs;
if (globs.components.indexOf('table') < 0 && globs.components.indexOf('tab') > 0) {
src = [src, '!' + output.uncompressed + '/**/table.css'];
}

return gulp.src(src)
.pipe(plumber())
.pipe(dedupe())
.pipe(replace(assets.uncompressed, assets.packaged))
Expand Down

0 comments on commit 2f5aacb

Please sign in to comment.