Skip to content

Commit

Permalink
add argument to node dir blder
Browse files Browse the repository at this point in the history
  • Loading branch information
gregl83 committed May 18, 2023
1 parent 170a1ae commit 569d850
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions node-module-directory-builder/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ nodejs_binary(
directory_build(
name = "node_module_directory_build",
node_binary = ":node_module_directory_builder_binary",
number_of_files = 5,
deps = [
"@directory_builder//:directory_builder"
],
Expand Down
3 changes: 2 additions & 1 deletion node-module-directory-builder/directory_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def _directory_build_impl(ctx):
inputs = ctx.files.deps,
outputs = [output_dir],
executable = node_binary,
arguments = [output_dir.path],
arguments = [output_dir.path, "{}".format(ctx.attr.number_of_files)],
)

return [
Expand All @@ -17,6 +17,7 @@ directory_build = rule(
implementation = _directory_build_impl,
attrs = {
"node_binary": attr.label(executable = True, cfg = "host"),
"number_of_files": attr.int(default = 3),
"deps": attr.label_list(allow_files = True),
},
)

0 comments on commit 569d850

Please sign in to comment.