Skip to content

Commit a970692

Browse files
committed
fix bazel build
1 parent 407f74e commit a970692

File tree

2 files changed

+47
-6
lines changed

2 files changed

+47
-6
lines changed

src/lib/form-field/BUILD.bazel

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ ng_module(
99
module_name = "@angular/material/form-field",
1010
assets = [
1111
":form_field_css",
12+
":form_field_box_css",
13+
":form_field_legacy_css",
14+
":form_field_standard_css",
1215
"//src/lib/input:input_css"
1316
],
1417
deps = [
@@ -19,14 +22,31 @@ ng_module(
1922
tsconfig = ":tsconfig-build.json",
2023
)
2124

22-
2325
sass_binary(
2426
name = "form_field_scss",
2527
src = "form-field.scss",
2628
deps = ["//src/lib/core:core_scss_lib"],
2729
)
2830

29-
# TODO(jelbourn): remove this when sass_binary supports specifying an output filename and dir.
31+
sass_binary(
32+
name = "form_field_box_scss",
33+
src = "form-field-box.scss",
34+
deps = ["//src/lib/core:core_scss_lib"],
35+
)
36+
37+
sass_binary(
38+
name = "form_field_legacy_scss",
39+
src = "form-field-legacy.scss",
40+
deps = ["//src/lib/core:core_scss_lib"],
41+
)
42+
43+
sass_binary(
44+
name = "form_field_standard_scss",
45+
src = "form-field-standard.scss",
46+
deps = ["//src/lib/core:core_scss_lib"],
47+
)
48+
49+
# TODO(jelbourn): remove these when sass_binary supports specifying an output filename and dir.
3050
# Copy the output of the sass_binary such that the filename and path match what we expect.
3151
genrule(
3252
name = "form_field_css",
@@ -35,3 +55,23 @@ genrule(
3555
cmd = "cat $(locations :form_field_scss) > $@",
3656
)
3757

58+
genrule(
59+
name = "form_field_box_css",
60+
srcs = [":form_field_box_scss"],
61+
outs = ["form-field-box.css"],
62+
cmd = "cat $(locations :form_field_box_scss) > $@",
63+
)
64+
65+
genrule(
66+
name = "form_field_legacy_css",
67+
srcs = [":form_field_legacy_scss"],
68+
outs = ["form-field-legacy.css"],
69+
cmd = "cat $(locations :form_field_legacy_scss) > $@",
70+
)
71+
72+
genrule(
73+
name = "form_field_standard_css",
74+
srcs = [":form_field_standard_scss"],
75+
outs = ["form-field-standard.css"],
76+
cmd = "cat $(locations :form_field_standard_scss) > $@",
77+
)

src/lib/input/input.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {Platform, PlatformModule} from '@angular/cdk/platform';
22
import {createFakeEvent, dispatchFakeEvent, wrappedErrorMessage} from '@angular/cdk/testing';
33
import {ChangeDetectionStrategy, Component, ViewChild} from '@angular/core';
4-
import {ComponentFixture, inject, TestBed, fakeAsync, flush} from '@angular/core/testing';
4+
import {ComponentFixture, fakeAsync, flush, inject, TestBed} from '@angular/core/testing';
55
import {
66
FormControl,
77
FormGroup,
@@ -12,16 +12,17 @@ import {
1212
Validators,
1313
} from '@angular/forms';
1414
import {
15-
MAT_LABEL_GLOBAL_OPTIONS,
16-
ShowOnDirtyErrorStateMatcher,
1715
ErrorStateMatcher,
1816
FloatLabelType,
17+
MAT_LABEL_GLOBAL_OPTIONS,
18+
ShowOnDirtyErrorStateMatcher,
1919
} from '@angular/material/core';
2020
import {
2121
getMatFormFieldDuplicatedHintError,
2222
getMatFormFieldMissingControlError,
2323
getMatFormFieldPlaceholderConflictError,
24-
MatFormField, MatFormFieldAppearance,
24+
MatFormField,
25+
MatFormFieldAppearance,
2526
MatFormFieldModule,
2627
} from '@angular/material/form-field';
2728
import {By} from '@angular/platform-browser';

0 commit comments

Comments
 (0)