From 0aec831ea46d06280a5f2badedb72fa912edb929 Mon Sep 17 00:00:00 2001 From: David Glasser Date: Mon, 18 Mar 2013 18:39:14 -0700 Subject: [PATCH] We should do a hot code push when static assets added by packages change, just like app static assets. --- engine/bundler.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/engine/bundler.js b/engine/bundler.js index b5721f32be..8635f8259b 100644 --- a/engine/bundler.js +++ b/engine/bundler.js @@ -187,7 +187,12 @@ _.extend(PackageBundlingInfo.prototype, { var ext = path.extname(rel_path).substr(1); var handler = self.get_source_handler(ext); - if (!handler) { + if (handler) { + handler(self.bundle.api, + path.join(self.pkg.source_root, rel_path), + path.join(self.pkg.serve_root, rel_path), + where); + } else { // If we don't have an extension handler, serve this file // as a static resource. self.bundle.api.add_resource({ @@ -196,14 +201,9 @@ _.extend(PackageBundlingInfo.prototype, { data: fs.readFileSync(path.join(self.pkg.source_root, rel_path)), where: where }); - return; } - handler(self.bundle.api, - path.join(self.pkg.source_root, rel_path), - path.join(self.pkg.serve_root, rel_path), - where); - + // Reload runner when this file changes. self.dependencies[rel_path] = true; } });