diff --git a/BUILD b/BUILD index f957b9bcd..8b5fd9e88 100644 --- a/BUILD +++ b/BUILD @@ -4,8 +4,6 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") exports_files(["tsconfig.json"]) -exports_files(["webpack.config.js"]) - PROTOBUF_DEPS = [ "@npm//protobufjs", # these deps are needed even though they are not automatic transitive deps of @@ -42,7 +40,7 @@ nodejs_binary( nodejs_binary( name = "tcm", data = [ - "@npm//typed-css-modules" + "@npm//typed-css-modules", ], entry_point = "typed-css-modules/lib/cli", install_source_map_support = False, diff --git a/fe/BUILD b/fe/BUILD index 26cd8bfc1..6fc61c823 100644 --- a/fe/BUILD +++ b/fe/BUILD @@ -3,14 +3,14 @@ package(default_visibility = ["//visibility:public"]) load("//tools:css_typings.bzl", "css_typings") filegroup( - name = "files", - srcs = glob(["**/*"]) + name = "files", + srcs = glob(["**/*"]), ) css_typings( - name = "css", - srcs = glob(["**/*.css"]), - path = "fe" + name = "css", + srcs = glob(["**/*.css"]), + path = "fe", ) load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") @@ -20,9 +20,9 @@ ts_library( srcs = glob(["**/*.tsx"]) + [":css"], module_name = "@dataform/fe", deps = [ + "@npm//@blueprintjs/core", "@npm//@types/node", "@npm//@types/react", "@npm//react", - "@npm//@blueprintjs/core", ], ) diff --git a/tests/integration/BUILD b/tests/integration/BUILD index 6e8c68434..ea540d502 100644 --- a/tests/integration/BUILD +++ b/tests/integration/BUILD @@ -22,8 +22,8 @@ ts_library( deps = [ ":utils", "//tests/utils", - "@npm//@types/mocha", "@npm//@types/chai", + "@npm//@types/mocha", "@npm//@types/node", ], ) diff --git a/tools/css_typings.bzl b/tools/css_typings.bzl index ffac45ef7..613fbc378 100644 --- a/tools/css_typings.bzl +++ b/tools/css_typings.bzl @@ -1,12 +1,14 @@ def css_typings(name, srcs, path): - # Only create outputs for css files. - outs = [f.replace(".css", ".css.d.ts") for f in srcs if f[-4:] == ".css"] - if (len(outs) == 0): - fail("No .css files found, check your srcs") - # Some little hacks in here to work with nested workspaces and the tcm CLI. - native.genrule( - name = name, - srcs = srcs + [":BUILD"], - outs = outs, - cmd = """$(location //:tcm) --silent -o $(GENDIR) -p "$$(dirname $(location :BUILD))/**/*.css" """, - tools = ["//:tcm"]) + # Only create outputs for css files. + outs = [f.replace(".css", ".css.d.ts") for f in srcs if f[-4:] == ".css"] + if (len(outs) == 0): + fail("No .css files found, check your srcs") + + # Some little hacks in here to work with nested workspaces and the tcm CLI. + native.genrule( + name = name, + srcs = srcs + [":BUILD"], + outs = outs, + cmd = """$(location //:tcm) --silent -o $(GENDIR) -p "$$(dirname $(location :BUILD))/**/*.css" """, + tools = ["//:tcm"], + )