From ce7fe9ff6d3339a3b020aad99c2efb9fc6c21c13 Mon Sep 17 00:00:00 2001
From: blavenie <benoit.lavenier@e-is.pro>
Date: Fri, 17 Feb 2017 09:51:55 +0100
Subject: [PATCH] fix build removeCod(<platform>: true)

---
 hooks/after_prepare/020_remove_code.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/hooks/after_prepare/020_remove_code.js b/hooks/after_prepare/020_remove_code.js
index 89eb5b53b..8b81ae40b 100755
--- a/hooks/after_prepare/020_remove_code.js
+++ b/hooks/after_prepare/020_remove_code.js
@@ -31,15 +31,15 @@ if (rootdir) {
     process.stdout.write('Removing unused code for device \n');
 
     // Compute options {device-<platform>: true}
-    var platformDeviceRemoveOptions = {};
-    platformDeviceRemoveOptions['device-' + platform] = true;
+    var platformRemoveCodeOptions = {};
+    platformRemoveCodeOptions[platform] = true; // = {<platform>: true}
 
     // Removing unused code for device...
     es.concat(
       // Remove unused HTML tags
       gulp.src([wwwPath + '/templates/**/*.html', pluginPath + '/templates/**/*.html'])
         .pipe(removeCode({device: true}))
-        .pipe(removeCode(platformDeviceRemoveOptions)) // = {device-<platform>: true}
+        .pipe(removeCode(platformRemoveCodeOptions))
         .pipe(removeHtml('.hidden-xs.hidden-sm'))
         .pipe(removeHtml('.hidden-device'))
         .pipe(removeHtml('[remove-if][remove-if="device"]'))
@@ -48,7 +48,7 @@ if (rootdir) {
 
       gulp.src(path.join(wwwPath, 'index.html'))
         .pipe(removeCode({device: true}))
-        .pipe(removeCode(platformDeviceRemoveOptions)) // = {device-<platform>: true}
+        .pipe(removeCode(platformRemoveCodeOptions))
         .pipe(removeHtml('.hidden-xs.hidden-sm'))
         .pipe(removeHtml('.hidden-device'))
         .pipe(removeHtml('[remove-if][remove-if="device"]'))
@@ -58,13 +58,13 @@ if (rootdir) {
       // Remove unused JS code + add ng annotations
       gulp.src([wwwPath + '/js/**/*.js'])
         .pipe(removeCode({device: true}))
-        .pipe(removeCode(platformDeviceRemoveOptions)) // = {device-<platform>: true}
+        .pipe(removeCode(platformRemoveCodeOptions))
         .pipe(ngAnnotate({single_quotes: true}))
         .pipe(gulp.dest(wwwPath + '/dist/dist_js/app')),
 
       gulp.src([pluginPath + '/js/**/*.js'])
         .pipe(removeCode({device: true}))
-        .pipe(removeCode(platformDeviceRemoveOptions)) // = {device-<platform>: true}
+        .pipe(removeCode(platformRemoveCodeOptions))
         .pipe(ngAnnotate({single_quotes: true}))
         .pipe(gulp.dest(wwwPath + '/dist/dist_js/plugins'))
      );
-- 
GitLab