gerrit/lib/codemirror/closure.defs
David Ostrovsky 7fc13dca82 Buck: upgrade to recent version
This version fixes a critical bug [1] that prevents us from simplifying
bucklets intergration. In this version, Buck only allows defining new
rule functions in files included with include_defs, not actually
instantiating rules, so we need to reshuffle some rules.

After this commit [2] "$(macro ...)" syntax is preserved for buck
macros, we need to use a backslash to send commands directly to the
shell: "\$(macro ...)". It turns out this doesn't work yet, shell
backticks seem to work though [3].

[1] https://github.com/facebook/buck/issues/182
[2] d6f3252170
[3] https://github.com/facebook/buck/issues/212

Change-Id: Ie99757bafc626d4ac2c5a75a2983d91b0c4f6d24
2014-10-27 20:13:42 +00:00

19 lines
361 B
Plaintext

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