Skip to content

Commit

Permalink
Run buildifier
Browse files Browse the repository at this point in the history
  • Loading branch information
lewish committed Mar 2, 2019
1 parent 8b1b4f8 commit 409128e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
4 changes: 1 addition & 3 deletions BUILD
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
12 changes: 6 additions & 6 deletions fe/BUILD
Expand Up @@ -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")
Expand All @@ -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",
],
)
2 changes: 1 addition & 1 deletion tests/integration/BUILD
Expand Up @@ -22,8 +22,8 @@ ts_library(
deps = [
":utils",
"//tests/utils",
"@npm//@types/mocha",
"@npm//@types/chai",
"@npm//@types/mocha",
"@npm//@types/node",
],
)
Expand Down
24 changes: 13 additions & 11 deletions 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"],
)

0 comments on commit 409128e

Please sign in to comment.