summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2018-09-12 21:25:43 -0700
committerBert Belder <bertbelder@gmail.com>2018-09-12 21:25:43 -0700
commit410ea92e32f83712fbeee9106fc195df28cd98b2 (patch)
tree5f37b99df66975c54baa2b46d1eb8ca81784b826
parentd38b3b585ca68f4bc9e95faa6c9c036dc8982575 (diff)
build: rebuild bundle when npm packages are added/removed/updated
-rw-r--r--BUILD.gn9
1 files changed, 6 insertions, 3 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 485582643..167ae82fb 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -80,6 +80,11 @@ ts_sources = [
"js/v8_source_maps.ts",
"js/write_file.ts",
"tsconfig.json",
+
+ # Listing package.json and yarn.lock as sources ensures the bundle is rebuilt
+ # when npm packages are added/removed or their contents changes.
+ "package.json",
+ "third_party/yarn.lock",
]
rust_executable("deno") {
@@ -236,9 +241,7 @@ run_node("gen_declarations") {
run_node("bundle") {
out_dir = "$target_gen_dir/bundle/"
- sources = ts_sources + [
- "rollup.config.js",
- ]
+ sources = ts_sources + [ "rollup.config.js" ]
outputs = [
out_dir + "main.js",
out_dir + "main.js.map",