|
1 | 1 | load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory") |
2 | 2 | load("@aspect_bazel_lib//lib:testing.bzl", "assert_outputs") |
| 3 | +load("@aspect_rules_js//js:defs.bzl", "js_test") |
3 | 4 | load("@aspect_rules_ts//ts:defs.bzl", "ts_config", "ts_project") |
4 | 5 | load("@bazel_skylib//rules:build_test.bzl", "build_test") |
5 | 6 |
|
@@ -44,6 +45,34 @@ ts_project( |
44 | 45 | tsconfig = {"compilerOptions": {"outDir": "out"}}, |
45 | 46 | ) |
46 | 47 |
|
| 48 | +ts_project( |
| 49 | + name = "ts-runtime-assets", |
| 50 | + srcs = ["src/index-runtime.ts"], |
| 51 | + assets = ["src/generated.json"], |
| 52 | + tsconfig = ":config", |
| 53 | +) |
| 54 | + |
| 55 | +js_test( |
| 56 | + name = "ts-runtime-assets_test", |
| 57 | + data = [":ts-runtime-assets"], |
| 58 | + entry_point = "src/index-runtime.js", |
| 59 | +) |
| 60 | + |
| 61 | +ts_project( |
| 62 | + name = "ts-runtime-outdir-assets", |
| 63 | + srcs = ["src/index-runtime.ts"], |
| 64 | + assets = ["src/generated.json"], |
| 65 | + extends = ":config", |
| 66 | + out_dir = "out", |
| 67 | + tsconfig = {"compilerOptions": {"outDir": "out"}}, |
| 68 | +) |
| 69 | + |
| 70 | +js_test( |
| 71 | + name = "ts-runtime-outdir-assets_test", |
| 72 | + data = [":ts-runtime-outdir-assets"], |
| 73 | + entry_point = "out/src/index-runtime.js", |
| 74 | +) |
| 75 | + |
47 | 76 | filegroup( |
48 | 77 | name = "assets-filegroup", |
49 | 78 | srcs = [ |
|
0 commit comments