Skip to content

Commit

Permalink
Allow ts_library without tsconfig attribute.
Browse files Browse the repository at this point in the history
Fixes #1

PiperOrigin-RevId: 156909101
  • Loading branch information
Typescript Team authored and alexeagle committed May 23, 2017
1 parent 51e3c34 commit 7654302
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ ts_library(
module_name = "some-lib",
# The imported path should be the library.d.ts file
module_root = "library",
tsconfig = "//examples:tsconfig.json",
)
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ def _compile_action(ctx, inputs, outputs, config_file_path):
for externs_file in externs_files:
ctx.file_action(output=externs_file, content="")

action_inputs = inputs
if ctx.file.tsconfig:
action_inputs += [ctx.file.tsconfig]

ctx.action(
inputs=inputs + [ctx.file.tsconfig],
inputs=action_inputs,
outputs=non_externs_files,
arguments=["-p", config_file_path],
executable=ctx.executable._tsc)
Expand Down

0 comments on commit 7654302

Please sign in to comment.