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, | |
) |