From 1e2b6813fb92a346ab2331bec70dd0c164f78781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20P=C3=A9rez?= Date: Tue, 22 May 2012 16:58:28 +0200 Subject: [PATCH 1/2] Move language template file to a property If you want to use a different i18n loader than Y.Intl.add you need to be able to override the template used to load the translation files. --- componentbuild/shared/macrolib.xml | 2 +- componentbuild/shared/properties.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/componentbuild/shared/macrolib.xml b/componentbuild/shared/macrolib.xml index 65870d4..7d2fbe4 100644 --- a/componentbuild/shared/macrolib.xml +++ b/componentbuild/shared/macrolib.xml @@ -289,7 +289,7 @@ - + diff --git a/componentbuild/shared/properties.xml b/componentbuild/shared/properties.xml index d678a21..1f0793c 100644 --- a/componentbuild/shared/properties.xml +++ b/componentbuild/shared/properties.xml @@ -106,6 +106,9 @@ + + + From 81291a289980acb9b3b40fd51b712e0d2673e3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20P=C3=A9rez?= Date: Tue, 22 May 2012 17:22:16 +0200 Subject: [PATCH 2/2] Add support for compiling handlebars templates into a js file Detect if templates/ (configurable) directory exists and compile the templates there into a js file (by default compiled-templates.js). This makes all the templates of the module directly available when loading the module. --- componentbuild/shared/macrolib.xml | 13 +++++++++++ componentbuild/shared/properties.xml | 5 +++++ componentbuild/shared/targets.xml | 33 +++++++++++++++++++++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/componentbuild/shared/macrolib.xml b/componentbuild/shared/macrolib.xml index 7d2fbe4..d9fc39d 100644 --- a/componentbuild/shared/macrolib.xml +++ b/componentbuild/shared/macrolib.xml @@ -1,6 +1,19 @@ + + + + + + + + + + + + + diff --git a/componentbuild/shared/properties.xml b/componentbuild/shared/properties.xml index 1f0793c..8ad10cb 100644 --- a/componentbuild/shared/properties.xml +++ b/componentbuild/shared/properties.xml @@ -28,6 +28,7 @@ + @@ -60,6 +61,10 @@ + + + + diff --git a/componentbuild/shared/targets.xml b/componentbuild/shared/targets.xml index fc0f03a..e8ef6e0 100644 --- a/componentbuild/shared/targets.xml +++ b/componentbuild/shared/targets.xml @@ -34,6 +34,37 @@ + + + + + + Precompiling templates for ${component} + + + + +Compiled templates not included in jsfiles! + +ERROR: +The component ${component} uses templates, but +'${compiled-templates.file}' is not listed in the +'component.jsfiles' entry of 'build.properties'. + +Please, add it to the file: +${component.basedir}/build.properties + + + + + + + ${component.jsfiles.base}/${compiled-templates.file} + + + + + @@ -75,7 +106,7 @@ - +