Add script to compile handlebars templates

For now it is small and there is no real standard yet. But it is better
to start with something.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-09-28 21:00:23 +02:00
parent b7bd6bd682
commit f4a15f7f42
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
REPODIR=`git rev-parse --show-toplevel`
cd $REPODIR
# Settings
handlebars -n OC.Settings.Templates settings/js/authtoken.handlebars -f settings/js/templates.js
# Contactsmenu
handlebars -n OC.ContactsMenu.Templates core/js/contactsmenu -f core/js/contactsmenu_templates.js
# Files app
handlebars -n OCA.Files.FileSummary.Templates apps/files/js/filesummary.handlebars -f apps/files/js/filesummary_template.js
if [[ $(git diff --name-only) ]]; then
echo "Please submit your compiled handlebars templates"
exit 1
fi
exit 0