summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-21 11:49:34 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-21 11:49:34 +0100
commit970a22f9ceb8590be661051fce0b371f532291a3 (patch)
tree359243d059e248774a35a3af5e244b048eb49d14
parent241dda266ccc0c2499ef360a5b010b750b1a105d (diff)
Extract compilation of Handlebars templates to its own script
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--Makefile4
-rwxr-xr-xcompile-handlebars-templates.sh6
2 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d869554bd..da5e92638 100644
--- a/Makefile
+++ b/Makefile
@@ -31,8 +31,8 @@ install-npm-deps:
install-npm-deps-dev:
npm install --deps
-build-js-templates: dev-setup
- ./node_modules/.bin/handlebars -n OCA.VideoCalls.Admin.Templates js/admin/templates/ -f js/admin/templates.js
+compile-handlebars-templates: dev-setup
+ bash compile-handlebars-templates.sh
dev-setup: install-npm-deps-dev
diff --git a/compile-handlebars-templates.sh b/compile-handlebars-templates.sh
new file mode 100755
index 000000000..663a5bd83
--- /dev/null
+++ b/compile-handlebars-templates.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+# Prefer the local handlebars script, and fall back to the global one.
+export PATH=./node_modules/.bin/:$PATH
+
+handlebars -n OCA.VideoCalls.Admin.Templates js/admin/templates/ -f js/admin/templates.js