add 4 parameters to init ammico app. These parameter are set from the ammico server thanks to the "context"
authorrougeronj
Tue, 09 Jun 2015 19:11:44 +0200
changeset 147 89f19425c580
parent 146 c6fa8ee3f562
child 148 9f6f17de6d98
add 4 parameters to init ammico app. These parameter are set from the ammico server thanks to the "context"
client/gulpfile.js
--- a/client/gulpfile.js	Tue Jun 09 19:10:45 2015 +0200
+++ b/client/gulpfile.js	Tue Jun 09 19:11:44 2015 +0200
@@ -4,7 +4,7 @@
 var mainBowerFiles = require('main-bower-files');
 var htmlreplace = require('gulp-html-replace');
 
-var templateFolder = './../server/src/ammico';
+var templatesFolder = './../server/src/ammico/templates';
 var staticFolder = './../server/src/ammico/static/ammico';
 var buildFolder = './build';
 
@@ -164,7 +164,11 @@
                 src: 'logo_IRI_footer.png',
                 tpl: '<img src="{% static \'ammico/img/%s\' %}" alt="Logo IRI" />'
             },
-            token: '{% if token %} token: "{{ token }}", {% endif %}'
+            idExpo: 'idExpo: "{{ context.idExpo }}",',
+            ammicoUrl: 'ammicoUrl: "{{ context.ammicoUrl }}",',
+            searchUrl: 'searchUrl: "{{ context.searchUrl }}",',
+            token: '{% if context.token %} token: "{{ context.token }}", {% endif %}'
         }))
-    .pipe(gulp.dest(templateFolder+'/templates'));
+        .pipe(plugins.rename('indexAmmico.html'))
+        .pipe(gulp.dest(templatesFolder));
 });