Skip to content

Commit

Permalink
fixup! chore: cleanups, back to ctx.actions.run
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Jan 7, 2023
1 parent 19755e7 commit 368d1b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions swc/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ def swc(name, srcs = None, args = [], data = [], output_dir = False, swcrc = Non

if type(swcrc) == type(dict()):
swcrc.setdefault("sourceMaps", source_maps)

rcfile = "{}_swcrc.json".format(name)
write_file(
name = "_gen_swcrc_" + name,
out = "{}_swcrc.json".format(name),
out = rcfile,
content = [json.encode(swcrc)],
)

# From here, the configuration becomes a file, the same as if the
# From here, the configuration becomes a file path, the same as if the
# user supplied a .swcrc InputArtifact
swcrc = "swcrc_%s.json" % name
swcrc = rcfile

# Convert source_maps True/False to "true"/"false" args value
if source_maps == True:
Expand Down

0 comments on commit 368d1b7

Please sign in to comment.