Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ package(default_visibility = ["//visibility:public"])

load("//:rollup-globals.bzl", "ROLLUP_GLOBALS")

exports_files(["LICENSE"])
exports_files([
"LICENSE",
"scss-bundle.config.json",
])

genrule(
name = "rollup_globals",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.4.2",
"run-sequence": "^1.2.2",
"scss-bundle": "^2.5.1",
"scss-bundle": "^3.0.2",
"selenium-webdriver": "^3.6.0",
"semver": "^6.3.0",
"send": "^0.17.1",
Expand Down
10 changes: 10 additions & 0 deletions scss-bundle.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"*1": "scss-bundle requires a config file in the Bazel execroot.",
"*2": "The config is used in the src/material:theming_bundle target",
Copy link
Member Author

@devversion devversion Dec 16, 2019

Choose a reason for hiding this comment

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

I don't like that scss-bundle now requires a config file since from a Bazel perspective.. it was more convenient to just pass flags & and sometimes needed for $(location).

Though there is no way around it for now. We can create an issue to ask them to make the config file optional.. but it looks like they need it for more (e.g. determining node modules folder)

"bundlerOptions": {
"logLevel": "error",
"dedupeGlobs": [
"./src/**/*.scss"
]
}
}
13 changes: 8 additions & 5 deletions src/material/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@ scss_bundle(
name = "theming_bundle",
outs = ["_theming.scss"],
args = [
"--entry=$(location //src/material/core:theming/_all-theme.scss)",
"--verbosity=Errors",
"--dedupe=./src/**/*.scss",
"--dest=$(location :_theming.scss)",
"--entryFile=$(location //src/material/core:theming/_all-theme.scss)",
"--outFile=$(location :_theming.scss)",
],
data = CDK_SCSS_LIBS + MATERIAL_SCSS_LIBS + [
"//src/material/core:theming/_all-theme.scss",
# Config file is required by "scss-bundle" and will be automatically
# loaded by the CLI. It expects the config to be in the execroot.
"//:scss-bundle.config.json",
],
data = CDK_SCSS_LIBS + MATERIAL_SCSS_LIBS + ["//src/material/core:theming/_all-theme.scss"],
)

# Creates the @angular/material package published to npm.
Expand Down
Loading