@@ -35,26 +35,30 @@ def _dgeni_api_docs(ctx):
3535 args .add_joined (entry_points , join_with = "," )
3636
3737 for entry_point in entry_points :
38- expected_outputs += [
38+ expected_outputs . append (
3939 # Declare the output for the current entry-point. The output file will always follow the
4040 # same format: "{output_folder}/{package_name}-{entry_point_name}.html"
4141 # (e.g. "api-docs/material-slider-testing.html")
4242 ctx .actions .declare_file ("%s-%s.html" %
4343 (package_name , entry_point .replace ("/" , "-" ))),
44- ]
44+ )
4545
4646 # Small workaround that ensures that the "ripple" API doc is properly exposed as an output
4747 # of the packaging rule. Technically Dgeni should not output the "ripple" directory as
4848 # its own entry-point. TODO(devversion): Support sub API docs for entry-points
4949 if package_name == "material" :
50- expected_outputs += [ ctx .actions .declare_file ("%s-%s.html" % (package_name , "ripple" ))]
50+ expected_outputs . append ( ctx .actions .declare_file ("%s-%s.html" % (package_name , "ripple" )))
5151
5252 # Run the Dgeni bazel executable which builds the documentation output based on the
5353 # configured rule attributes.
5454 ctx .actions .run (
5555 # Note that we want to add the dgeni template files as well. This makes sure that the
5656 # templates are available in the sandbox execution and can be read by Dgeni.
5757 inputs = input_files + ctx .files ._dgeni_templates ,
58+ env = {
59+ # Not needed as we operate with source files outside bazel-bin.
60+ "JS_BINARY__NO_CD_BINDIR" : "1" ,
61+ },
5862 executable = ctx .executable ._dgeni_bin ,
5963 outputs = expected_outputs ,
6064 arguments = [args ],
@@ -83,7 +87,7 @@ dgeni_api_docs = rule(
8387 "_dgeni_bin" : attr .label (
8488 default = Label ("//tools/dgeni" ),
8589 executable = True ,
86- cfg = "host " ,
90+ cfg = "exec " ,
8791 ),
8892
8993 # Dgeni document templates that should be be available as inputs to the
0 commit comments