Files
flatbuffers/tests/ts/bazel_repository_test_dir/BUILD
Philipp Schrader 4172c3f0bd Migrate from rules_nodejs to rules_js/rules_ts (#7923)
* Start using pnpm

* Add @npm

* get more stuff set up

* Get the analysis phase passing.

* Get esbuild working?

* Get it compiling?

    $ bazel build //tests/ts/...

* Try to get the test working

* test is passing

* Get the other tests working

* clarify comment

* clean up a bit

* Try to add another test

* Add another test

* clean up more

* remove unused reference

* Add e2e test

* Get more of the test working

* add lock file

* Get test working on its own

* Get e2e test passing

* fix infinite recursion

* Add comments

* clean up some more

* clean up more again

* Source typescript version from package.json

* run buildifier

* lint

* Fix unset `extra_env`

* Incorporate feedback

* run buildifier

---------

Co-authored-by: Derek Bailey <derekbailey@google.com>
2023-04-28 18:17:45 +00:00

33 lines
748 B
Python

load("@aspect_rules_js//js:defs.bzl", "js_test")
load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library")
load("@aspect_rules_js//npm:defs.bzl", "npm_link_package")
load("@npm//:defs.bzl", "npm_link_all_packages")
npm_link_all_packages(name = "node_modules")
npm_link_package(
name = "node_modules/flatbuffers",
src = "@com_github_google_flatbuffers//ts:flatbuffers",
)
flatbuffer_ts_library(
name = "one_fbs",
srcs = ["one.fbs"],
)
flatbuffer_ts_library(
name = "two_fbs",
srcs = ["two.fbs"],
deps = [":one_fbs"],
)
js_test(
name = "import_test",
data = [
"package.json",
":node_modules/flatbuffers",
":two_fbs",
],
entry_point = "import_test.js",
)