test: Enable sass compiler for bazel integration test (#19357)
This commit is contained in:
parent
27c6638913
commit
2cf52c1b55
|
@ -0,0 +1,3 @@
|
|||
# Workaround https://github.com/bazelbuild/bazel/issues/3645
|
||||
# Limit Bazel to consuming 3072K of RAM
|
||||
build --local_resources=3072,2.0,1.0
|
|
@ -18,3 +18,13 @@ local_repository(
|
|||
name = "angular",
|
||||
path = "node_modules/@angular/bazel",
|
||||
)
|
||||
|
||||
git_repository(
|
||||
name = "io_bazel_rules_sass",
|
||||
remote = "https://github.com/bazelbuild/rules_sass.git",
|
||||
tag = "0.0.2",
|
||||
)
|
||||
|
||||
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_repositories")
|
||||
|
||||
sass_repositories()
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
load("@angular//:index.bzl", "ng_module")
|
||||
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary")
|
||||
|
||||
sass_binary(
|
||||
name = "hello-world-styles",
|
||||
src = "hello-world.component.scss",
|
||||
)
|
||||
|
||||
ng_module(
|
||||
name = "hello-world",
|
||||
srcs = glob(["*.ts"]),
|
||||
tsconfig = "//src:tsconfig.json",
|
||||
# TODO(alexeagle): re-enable
|
||||
# assets = [":styles"],
|
||||
assets = [":hello-world-styles.css"],
|
||||
)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
$example-red: #ff0000;
|
||||
|
||||
h1 {
|
||||
color: $example-red;
|
||||
}
|
|
@ -8,8 +8,7 @@ import {Component, NgModule} from '@angular/core';
|
|||
<input type="text" [value]="name" (input)="name = $event.target.value"/>
|
||||
`,
|
||||
// TODO: might be better to point to .scss so this looks valid at design-time
|
||||
// TODO(alexeagle): re-enable SASS
|
||||
// styleUrls: ['./styles.css']
|
||||
styleUrls: ['./hello-world-styles.css'],
|
||||
})
|
||||
export class HelloWorldComponent {
|
||||
name: string = 'world';
|
||||
|
|
Loading…
Reference in New Issue