Skip to content
Snippets Groups Projects
Commit ce7fe9ff authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

fix build removeCod(<platform>: true)

parent f2c3b51c
No related branches found
No related tags found
No related merge requests found
...@@ -31,15 +31,15 @@ if (rootdir) { ...@@ -31,15 +31,15 @@ if (rootdir) {
process.stdout.write('Removing unused code for device \n'); process.stdout.write('Removing unused code for device \n');
// Compute options {device-<platform>: true} // Compute options {device-<platform>: true}
var platformDeviceRemoveOptions = {}; var platformRemoveCodeOptions = {};
platformDeviceRemoveOptions['device-' + platform] = true; platformRemoveCodeOptions[platform] = true; // = {<platform>: true}
// Removing unused code for device... // Removing unused code for device...
es.concat( es.concat(
// Remove unused HTML tags // Remove unused HTML tags
gulp.src([wwwPath + '/templates/**/*.html', pluginPath + '/templates/**/*.html']) gulp.src([wwwPath + '/templates/**/*.html', pluginPath + '/templates/**/*.html'])
.pipe(removeCode({device: true})) .pipe(removeCode({device: true}))
.pipe(removeCode(platformDeviceRemoveOptions)) // = {device-<platform>: true} .pipe(removeCode(platformRemoveCodeOptions))
.pipe(removeHtml('.hidden-xs.hidden-sm')) .pipe(removeHtml('.hidden-xs.hidden-sm'))
.pipe(removeHtml('.hidden-device')) .pipe(removeHtml('.hidden-device'))
.pipe(removeHtml('[remove-if][remove-if="device"]')) .pipe(removeHtml('[remove-if][remove-if="device"]'))
...@@ -48,7 +48,7 @@ if (rootdir) { ...@@ -48,7 +48,7 @@ if (rootdir) {
gulp.src(path.join(wwwPath, 'index.html')) gulp.src(path.join(wwwPath, 'index.html'))
.pipe(removeCode({device: true})) .pipe(removeCode({device: true}))
.pipe(removeCode(platformDeviceRemoveOptions)) // = {device-<platform>: true} .pipe(removeCode(platformRemoveCodeOptions))
.pipe(removeHtml('.hidden-xs.hidden-sm')) .pipe(removeHtml('.hidden-xs.hidden-sm'))
.pipe(removeHtml('.hidden-device')) .pipe(removeHtml('.hidden-device'))
.pipe(removeHtml('[remove-if][remove-if="device"]')) .pipe(removeHtml('[remove-if][remove-if="device"]'))
...@@ -58,13 +58,13 @@ if (rootdir) { ...@@ -58,13 +58,13 @@ if (rootdir) {
// Remove unused JS code + add ng annotations // Remove unused JS code + add ng annotations
gulp.src([wwwPath + '/js/**/*.js']) gulp.src([wwwPath + '/js/**/*.js'])
.pipe(removeCode({device: true})) .pipe(removeCode({device: true}))
.pipe(removeCode(platformDeviceRemoveOptions)) // = {device-<platform>: true} .pipe(removeCode(platformRemoveCodeOptions))
.pipe(ngAnnotate({single_quotes: true})) .pipe(ngAnnotate({single_quotes: true}))
.pipe(gulp.dest(wwwPath + '/dist/dist_js/app')), .pipe(gulp.dest(wwwPath + '/dist/dist_js/app')),
gulp.src([pluginPath + '/js/**/*.js']) gulp.src([pluginPath + '/js/**/*.js'])
.pipe(removeCode({device: true})) .pipe(removeCode({device: true}))
.pipe(removeCode(platformDeviceRemoveOptions)) // = {device-<platform>: true} .pipe(removeCode(platformRemoveCodeOptions))
.pipe(ngAnnotate({single_quotes: true})) .pipe(ngAnnotate({single_quotes: true}))
.pipe(gulp.dest(wwwPath + '/dist/dist_js/plugins')) .pipe(gulp.dest(wwwPath + '/dist/dist_js/plugins'))
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment