Skip to content

Commit

Permalink
chore(NA): creates wrapper macro for ts_project rule (elastic#117424) (
Browse files Browse the repository at this point in the history
…elastic#117454)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
  • Loading branch information
kibanamachine and mistic authored Nov 4, 2021
1 parent d891dfc commit a29bbc0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dev/bazel/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ Please do not import from any other files when looking to use a custom rule
"""

load("//src/dev/bazel:jsts_transpiler.bzl", _jsts_transpiler = "jsts_transpiler")
load("//src/dev/bazel:ts_project.bzl", _ts_project = "ts_project")

jsts_transpiler = _jsts_transpiler
ts_project = _ts_project
16 changes: 16 additions & 0 deletions src/dev/bazel/ts_project.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"Simple wrapper over the general ts_project rule from rules_nodejs so we can override some configs"

load("@npm//@bazel/typescript:index.bzl", _ts_project = "ts_project")

def ts_project(validate = False, **kwargs):
"""A macro around the upstream ts_project rule.
Args:
validate: boolean; whether to check that the tsconfig JSON settings match the attributes on this target. Defaults to false
**kwargs: the rest
"""

_ts_project(
validate = validate,
**kwargs
)

0 comments on commit a29bbc0

Please sign in to comment.