From 4b3f06bae2679398ef937e010e96997da7c0ca7b Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Wed, 6 Dec 2017 08:28:38 -0800 Subject: [PATCH] build(bazel): adds bazel build files to support building rxjs with bazel from dist (#3168) --- .make-packages.js | 2 ++ src/BUILD.bazel | 12 ++++++++++++ src/WORKSPACE | 1 + 3 files changed, 15 insertions(+) create mode 100644 src/BUILD.bazel create mode 100644 src/WORKSPACE diff --git a/.make-packages.js b/.make-packages.js index 8a0adac635..888ac9ac09 100644 --- a/.make-packages.js +++ b/.make-packages.js @@ -98,6 +98,8 @@ fs.copySync(TYPE_ROOT, TYPE_PKG); copySources(ESM5_ROOT, ESM5_PKG, true); copySources(ESM2015_ROOT, ESM2015_PKG, true); +// Copy over tsconfig.json for bazel build support +fs.copySync('./tsconfig.json', PKG_ROOT + 'src/tsconfig.json'); fs.writeJsonSync(PKG_ROOT + 'package.json', rootPackageJson); diff --git a/src/BUILD.bazel b/src/BUILD.bazel new file mode 100644 index 0000000000..31156c7e7f --- /dev/null +++ b/src/BUILD.bazel @@ -0,0 +1,12 @@ +package(default_visibility = ["//visibility:public"]) + +exports_files(["tsconfig.json"]) + +load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") + +ts_library( + name = "rxjs", + module_name = "rxjs", + srcs = glob(["*.ts", "**/*.ts"]), + tsconfig = "tsconfig.json", +) diff --git a/src/WORKSPACE b/src/WORKSPACE new file mode 100644 index 0000000000..034c99e579 --- /dev/null +++ b/src/WORKSPACE @@ -0,0 +1 @@ +workspace(name = "rxjs")