Skip to content

Commit

Permalink
chore: introduce a ts_project transpiler macro
Browse files Browse the repository at this point in the history
maybe reproduces a bug
  • Loading branch information
alexeagle committed Aug 21, 2024
1 parent 02269a1 commit a5b32db
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions example/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

bazel_dep(name = "aspect_rules_lint", version = "0.0.0")
bazel_dep(name = "aspect_bazel_lib", version = "2.7.7")
bazel_dep(name = "aspect_rules_js", version = "2.0.0-rc0")
bazel_dep(name = "aspect_rules_ts", version = "3.0.0-rc0")
bazel_dep(name = "aspect_rules_js", version = "2.0.0")
bazel_dep(name = "aspect_rules_swc", version = "2.0.0")
bazel_dep(name = "aspect_rules_ts", version = "3.0.0")
bazel_dep(name = "rules_buf", version = "0.3.0")
bazel_dep(name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "toolchains_llvm", version = "0.10.3")
Expand Down
5 changes: 4 additions & 1 deletion example/src/subdir/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@aspect_rules_swc//swc:defs.bzl", "swc")
load("@aspect_rules_ts//ts:defs.bzl", "ts_project")

exports_files(["ruff.toml"])
Expand All @@ -17,7 +18,9 @@ ts_project(
name = "ts",
srcs = ["test.ts"],
declaration = True,
transpiler = "tsc",
# verify that even when the macro expands to have js_library targets
# we don't try to lint the output javascript files
transpiler = swc,
tsconfig = "//src:tsconfig",
deps = [
"//:node_modules/@types/node",
Expand Down
3 changes: 2 additions & 1 deletion example/src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"declaration": true,
"esModuleInterop": true,
"strictNullChecks": true
}
},
"exclude": []
}

0 comments on commit a5b32db

Please sign in to comment.