From bb5053990b86e0499afe7eebf358de9ce0dabb4d Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 18 Oct 2021 12:06:19 +1000 Subject: [PATCH] pass ts deps into most Svelte packages; remove redundant deps Henrik, I've left editable/editor alone to avoid causing a conflict; please add them in your PR instead when you get a chance. --- ts/card-info/BUILD.bazel | 13 ++++++++----- ts/change-notetype/BUILD.bazel | 29 +++++++++++++---------------- ts/components/BUILD.bazel | 19 +++++++++++-------- ts/congrats/BUILD.bazel | 2 -- ts/deck-options/BUILD.bazel | 34 ++++++++++++++++------------------ ts/graphs/BUILD.bazel | 25 +++++++++++++++---------- ts/reviewer/BUILD.bazel | 4 ---- 7 files changed, 63 insertions(+), 63 deletions(-) diff --git a/ts/card-info/BUILD.bazel b/ts/card-info/BUILD.bazel index 4f94e04e2..447dfe6bc 100644 --- a/ts/card-info/BUILD.bazel +++ b/ts/card-info/BUILD.bazel @@ -16,15 +16,18 @@ compile_sass( ], ) -compile_svelte() +_ts_deps = [ + "//ts/components", + "//ts/lib", + "@npm//@fluent", +] + +compile_svelte(deps = _ts_deps) typescript( name = "index", - deps = [ + deps = _ts_deps + [ ":svelte", - "//ts/components", - "//ts/lib", - "@npm//@fluent", ], ) diff --git a/ts/change-notetype/BUILD.bazel b/ts/change-notetype/BUILD.bazel index 41ecbf6c6..a52ddc8bc 100644 --- a/ts/change-notetype/BUILD.bazel +++ b/ts/change-notetype/BUILD.bazel @@ -17,20 +17,23 @@ compile_sass( ], ) -compile_svelte() +_ts_deps = [ + "//ts/components", + "//ts/lib", + "//ts/sveltelib", + "@npm//@fluent", + "@npm//@types/jest", + "@npm//lodash-es", + "@npm//svelte", + "@npm//marked", +] + +compile_svelte(deps = _ts_deps) typescript( name = "index", - deps = [ + deps = _ts_deps + [ ":svelte", - "//ts/components", - "//ts/lib", - "//ts/sveltelib", - "@npm//@fluent", - "@npm//@types/jest", - "@npm//lodash-es", - "@npm//svelte", - "@npm//svelte2tsx", ], ) @@ -47,12 +50,6 @@ esbuild( ":base_css", ":index", ":svelte", - "//ts/components", - "//ts/lib", - "//ts/sveltelib", - "@npm//bootstrap", - "@npm//marked", - "@npm//protobufjs", ], ) diff --git a/ts/components/BUILD.bazel b/ts/components/BUILD.bazel index aa35ce8a7..ff0c4a56b 100644 --- a/ts/components/BUILD.bazel +++ b/ts/components/BUILD.bazel @@ -3,20 +3,23 @@ load("//ts:prettier.bzl", "prettier_test") load("//ts:eslint.bzl", "eslint_test") load("//ts:typescript.bzl", "typescript") +_ts_deps = [ + "//ts/lib", + "//ts/sveltelib", + "@npm//@popperjs/core", + "@npm//@types/bootstrap", + "@npm//bootstrap", + "@npm//svelte", +] + compile_svelte( - deps = ["//sass/bootstrap"], + deps = _ts_deps + ["//sass/bootstrap"], ) typescript( name = "components", - deps = [ + deps = _ts_deps + [ ":svelte", - "//ts/lib", - "//ts/sveltelib", - "@npm//@popperjs/core", - "@npm//@types/bootstrap", - "@npm//bootstrap", - "@npm//svelte", ], ) diff --git a/ts/congrats/BUILD.bazel b/ts/congrats/BUILD.bazel index c9b4de4ca..f1ee634f6 100644 --- a/ts/congrats/BUILD.bazel +++ b/ts/congrats/BUILD.bazel @@ -43,8 +43,6 @@ esbuild( ":base_css", ":index", ":svelte", - "//ts/lib", - "@npm//protobufjs", ], ) diff --git a/ts/deck-options/BUILD.bazel b/ts/deck-options/BUILD.bazel index 74971680e..d724f6cca 100644 --- a/ts/deck-options/BUILD.bazel +++ b/ts/deck-options/BUILD.bazel @@ -18,25 +18,29 @@ compile_sass( ], ) +_ts_deps = [ + "//ts/components", + "//ts/lib", + "//ts/sveltelib", + "@npm//@fluent", + "@npm//@popperjs", + "@npm//@types/jest", + "@npm//bootstrap-icons", + "@npm//lodash-es", + "@npm//svelte", + "@npm//marked", +] + compile_svelte( - deps = [ + deps = _ts_deps + [ "//sass/bootstrap", ], ) typescript( name = "index", - deps = [ + deps = _ts_deps + [ ":svelte", - "//ts/components", - "//ts/lib", - "//ts/sveltelib", - "@npm//@fluent", - "@npm//@popperjs", - "@npm//@types/jest", - "@npm//bootstrap-icons", - "@npm//lodash-es", - "@npm//svelte", ], ) @@ -50,15 +54,9 @@ esbuild( output_css = "deck-options.css", visibility = ["//visibility:public"], deps = [ - "index", ":base_css", + ":index", ":svelte", - "//ts/components", - "//ts/lib", - "//ts/sveltelib", - "@npm//bootstrap", - "@npm//marked", - "@npm//protobufjs", ], ) diff --git a/ts/graphs/BUILD.bazel b/ts/graphs/BUILD.bazel index 6dc5ff1b8..551e1dc81 100644 --- a/ts/graphs/BUILD.bazel +++ b/ts/graphs/BUILD.bazel @@ -15,20 +15,25 @@ compile_sass( ], ) -compile_svelte() +_ts_deps = [ + "//ts/lib", + "//ts/sveltelib", + "@npm//@fluent", + "@npm//@types/d3", + "@npm//@types/lodash", + "@npm//d3", + "@npm//lodash-es", + "@npm//svelte", +] + +compile_svelte( + deps = _ts_deps, +) typescript( name = "index", - deps = [ + deps = _ts_deps + [ ":svelte", - "//ts/lib", - "//ts/sveltelib", - "@npm//@fluent", - "@npm//@types/d3", - "@npm//@types/lodash", - "@npm//d3", - "@npm//lodash-es", - "@npm//svelte", ], ) diff --git a/ts/reviewer/BUILD.bazel b/ts/reviewer/BUILD.bazel index 0b81c1bd2..2ca07d744 100644 --- a/ts/reviewer/BUILD.bazel +++ b/ts/reviewer/BUILD.bazel @@ -28,8 +28,6 @@ esbuild( visibility = ["//visibility:public"], deps = [ ":reviewer_ts", - "//ts/lib", - "@npm//protobufjs", ], ) @@ -39,8 +37,6 @@ esbuild( visibility = ["//visibility:public"], deps = [ ":reviewer_ts", - "//ts/lib", - "@npm//protobufjs", ], )