From c3e4def82cf113334a53a8ae5ccfc544f6f5fef2 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Tue, 9 Feb 2016 15:43:40 -0800 Subject: [PATCH] Add JS building step to setupbase --- setupbase.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setupbase.py b/setupbase.py index 6e90cec07..29d37314e 100644 --- a/setupbase.py +++ b/setupbase.py @@ -118,7 +118,7 @@ def find_package_data(): # for verification purposes, explicitly add main.min.js # so that installation will fail if they are missing for app in ['auth', 'edit', 'notebook', 'terminal', 'tree']: - static_data.append(pjoin('static', app, 'js', 'main.min.js')) + static_data.append(pjoin('static', app, 'js', 'built', 'main.min.js')) components = pjoin("static", "components") # select the components we actually need to install @@ -427,11 +427,11 @@ class CompileJS(Command): self.force = bool(self.force) apps = ['notebook', 'tree', 'edit', 'terminal', 'auth'] - targets = [ pjoin(static, app, 'js', 'main.min.js') for app in apps ] + targets = [ pjoin(static, app, 'js', 'built', 'main.min.js') for app in apps ] def sources(self, name): """Generator yielding .js sources that an application depends on""" - yield pjoin(static, name, 'js', 'main.js') + yield pjoin(static, name, 'js', 'built', 'main.js') for sec in [name, 'base', 'auth']: for f in glob(pjoin(static, sec, 'js', '*.js')): @@ -461,13 +461,13 @@ class CompileJS(Command): def build_main(self, name): """Build main.min.js""" - target = pjoin(static, name, 'js', 'main.min.js') + target = pjoin(static, name, 'js', 'build', 'main.min.js') if not self.should_run(name, target): log.info("%s up to date" % target) return log.info("Rebuilding %s" % target) - run(['node', 'tools/build-main.js', name]) + run(['npm', 'run', 'build']) def run(self): self.run_command('jsdeps')