| load("@bazel_skylib//:bzl_library.bzl", "bzl_library") |
| |
| # BEGIN-INTERNAL |
| load("//:index.bzl", "js_library") |
| load("//packages/typescript:checked_in_ts_project.bzl", "checked_in_ts_project") |
| |
| # We can't bootstrap the ts_library rule using the linker itself, |
| # because the implementation of ts_library depends on the linker so that would be a cycle. |
| # So we compile it to JS and check in the result as index.js. |
| # To update index.js run: |
| # bazel run //internal/linker:linker_lib_check_compiled.update |
| checked_in_ts_project( |
| name = "linker_lib", |
| src = "link_node_modules.ts", |
| checked_in_js = "index.js", |
| visibility = ["//internal/linker:__subpackages__"], |
| deps = [ |
| "//packages/runfiles:bazel_runfiles", |
| "@npm//@types/node", |
| ], |
| ) |
| |
| js_library( |
| name = "linker_js", |
| srcs = ["index.js"], |
| visibility = ["//internal/linker/test:__pkg__"], |
| deps = ["//internal/runfiles:runfiles_js"], |
| ) |
| |
| # END-INTERNAL |
| exports_files([ |
| "index.js", |
| ]) |
| |
| filegroup( |
| name = "package_contents", |
| srcs = glob([ |
| "*.bzl", |
| "*.js", |
| ]) + [ |
| "BUILD.bazel", |
| ], |
| visibility = ["//:__pkg__"], |
| ) |
| |
| bzl_library( |
| name = "bzl", |
| srcs = glob(["*.bzl"]), |
| visibility = ["//visibility:public"], |
| ) |