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",
|
name = "angular",
|
||||||
path = "node_modules/@angular/bazel",
|
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"])
|
package(default_visibility = ["//visibility:public"])
|
||||||
load("@angular//:index.bzl", "ng_module")
|
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(
|
ng_module(
|
||||||
name = "hello-world",
|
name = "hello-world",
|
||||||
srcs = glob(["*.ts"]),
|
srcs = glob(["*.ts"]),
|
||||||
tsconfig = "//src:tsconfig.json",
|
tsconfig = "//src:tsconfig.json",
|
||||||
# TODO(alexeagle): re-enable
|
assets = [":hello-world-styles.css"],
|
||||||
# assets = [":styles"],
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"/>
|
<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: might be better to point to .scss so this looks valid at design-time
|
||||||
// TODO(alexeagle): re-enable SASS
|
styleUrls: ['./hello-world-styles.css'],
|
||||||
// styleUrls: ['./styles.css']
|
|
||||||
})
|
})
|
||||||
export class HelloWorldComponent {
|
export class HelloWorldComponent {
|
||||||
name: string = 'world';
|
name: string = 'world';
|
||||||
|
|
Loading…
Reference in New Issue