Skip to content

Commit 1fc9832

Browse files
committed
build: fix spectrum copyright being stripped on build
1 parent 1eadd4f commit 1fc9832

File tree

5 files changed

+11
-42
lines changed

5 files changed

+11
-42
lines changed

tools/component-builder-simple/css/index.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,13 @@ function buildCSSThemeIndex() {
6767

6868
function buildCSSThemes() {
6969
return gulp
70-
.src(["themes/*.css"], {
70+
.src([
71+
"themes/*.css",
72+
"!themes/express.css",
73+
], {
7174
allowEmpty: true,
7275
})
73-
.pipe(postcss(processorsFunction({ noSelectors: true })))
76+
.pipe(postcss(processorsFunction({ noSelectors: true, keepComments: true })))
7477
.pipe(gulp.dest("dist/themes/"));
7578
}
7679

tools/component-builder-simple/css/plugins/postcss-strip-comments.js

-35
This file was deleted.

tools/component-builder-simple/css/processors.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
1010
governing permissions and limitations under the License.
1111
*/
1212

13-
function getProcessors(splitinatorOptions = {}) {
13+
function getProcessors({ noFlatVariables = false, noSelectors = false, keepComments = false } = {}) {
1414
return [
1515
require("postcss-import"),
1616
require("postcss-nested"),
@@ -21,7 +21,8 @@ function getProcessors(splitinatorOptions = {}) {
2121
}
2222
return identifier;
2323
},
24-
...splitinatorOptions,
24+
noFlatVariables,
25+
noSelectors,
2526
}),
2627
require("postcss-inherit"),
2728
require("./plugins/postcss-transform-logical")(),
@@ -30,7 +31,7 @@ function getProcessors(splitinatorOptions = {}) {
3031
require("postcss-dropunusedvars")({ fix: false }),
3132
require("postcss-dropdupedvars"),
3233
require("postcss-discard-empty"),
33-
require("postcss-discard-comments")({ removeAllButFirst: true }),
34+
!keepComments ? require("postcss-discard-comments")({ removeAllButFirst: true }) : null,
3435
require("autoprefixer")({}),
3536
].filter(Boolean);
3637
}

tools/component-builder-simple/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"postcss": "^7.0.36",
2525
"postcss-calc": "^6.0.0",
2626
"postcss-combininator": "^1.0.2",
27-
"postcss-discard-comments": "^4.0.0",
27+
"postcss-discard-comments": "^4.0.2",
2828
"postcss-discard-empty": "^4.0.1",
2929
"postcss-dropdupedvars": "file:../../plugins/postcss-dropdupedvars",
3030
"postcss-dropunusedvars": "file:../../plugins/postcss-dropunusedvars",

yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -13866,7 +13866,7 @@ postcss-dir-pseudo-class@^5.0.0:
1386613866
postcss "^7.0.2"
1386713867
postcss-selector-parser "^5.0.0-rc.3"
1386813868

13869-
postcss-discard-comments@^4.0.0:
13869+
postcss-discard-comments@^4.0.0, postcss-discard-comments@^4.0.2:
1387013870
version "4.0.2"
1387113871
resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz#1fbabd2c246bff6aaad7997b2b0918f4d7af4033"
1387213872
integrity sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==

0 commit comments

Comments
 (0)