blob: 0da1501f341d19238940196e331ef277a4ed56d4 [file] [log] [blame]
def js_minify(
name,
out,
compiler_args = [],
srcs = [],
generated = []):
cmd = ['$(exe :js_minifier) --js_output_file $OUT'] + compiler_args
if srcs:
cmd.append('$SRCS')
if generated:
cmd.extend(['$(location %s)' % n for n in generated])
genrule(
name = name,
cmd = ' '.join(cmd),
srcs = srcs,
out = out,
)