mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-09-11 14:46:37 +03:00
Make prepack-dev work with js_bundle_genrule
Summary: Make prepack work with `js_bundle_genrule` by creating a nodejs_binary call that wraps the prepack CLI. Reviewed By: davidaurelio Differential Revision: D6107598 fbshipit-source-id: 6cf3992ecfdc3e15eeed648d341389f4415b79a6
This commit is contained in:
parent
a2c394535c
commit
f021724714
13
DEFS
Normal file
13
DEFS
Normal file
@ -0,0 +1,13 @@
|
||||
def create_prepack_dev_postprocessor(name, js_bundle, modelfile):
|
||||
return js_bundle_genrule(
|
||||
name = name,
|
||||
js_bundle = js_bundle,
|
||||
bash = r"""
|
||||
set -e
|
||||
$(exe //prepack:prepack-bundle-dev) {MODEL} --out "$OUT/$JS_BUNDLE_NAME" \
|
||||
--srcmapIn "$SOURCEMAP" --srcmapOut "$SOURCEMAP_OUT" \
|
||||
$JS_DIR/$JS_BUNDLE_NAME
|
||||
""".format(MODEL = modelfile),
|
||||
rewrite_sourcemap = True,
|
||||
visibility = ["PUBLIC"],
|
||||
)
|
Loading…
Reference in New Issue
Block a user