Skip to content

Commit

Permalink
fix(build): build targets with sass external imports (#60)
Browse files Browse the repository at this point in the history
See #61
  • Loading branch information
ztl8702 authored Feb 29, 2020
1 parent c3dd0f9 commit 679f66f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ build --define=angular_ivy_enabled=True
common --experimental_allow_incremental_repository_updates

# Disable sandbox on Mac OS for performance reason.
build --spawn_strategy=local

# TODO(https://github.com/MindongLab/yngdieng/issues/61):
# Cannot disable sandbox for build because of SassCompiler not being herematic.
#build --spawn_strategy=local
run --spawn_strategy=local
test --spawn_strategy=local

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"format": "git-clang-format",
"precommit": "check-clang-format \"yarn format\""
"format": "git-clang-format"
},
"engines": {
"node": ">=10.9.0 <13.0.0",
Expand Down Expand Up @@ -82,5 +81,10 @@
"tslint": "5.15.0",
"typescript": "3.6.4",
"webpack": "4.41.5"
},
"husky": {
"hooks": {
"pre-commit": "check-clang-format \"yarn format\""
}
}
}
5 changes: 4 additions & 1 deletion web/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ load("@npm_bazel_terser//:index.bzl", "terser_minified")
sass_binary(
name = "global_stylesheet",
src = "styles.scss",
include_paths = ["external/npm/node_modules"],
output_name = "global_stylesheet.css",
deps = [":custom_theme"]
deps = [
":custom_theme",
],
)

sass_library(
Expand Down
2 changes: 1 addition & 1 deletion web/src/custom-theme.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'external/npm/node_modules/@angular/material/theming';
@import '@angular/material/theming';
// Plus imports for other components in your app.

// Include the common styles for Angular Material. We include this here so that you only
Expand Down

0 comments on commit 679f66f

Please sign in to comment.