diff --git a/build/Gruntfile.js b/build/Gruntfile.js index 73885594d..a5dd7e8a8 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -247,7 +247,8 @@ module.exports = function(grunt) { }, cssmin: { - styles: { + // options: {level: { 1: { roundingPrecision: 'all=3' }}}, // to round fw7 numbers in styles. need clean-css 4.0 + target: { files: { "<%= pkg.mobile.css.ios.dist %>" : packageFile['mobile']['css']['ios']['src'], "<%= pkg.mobile.css.material.dist %>" : packageFile['mobile']['css']['material']['src'] @@ -293,6 +294,19 @@ module.exports = function(grunt) { return packageFile.version; } }] + }, + fixResourceUrl: { + src: ['<%= pkg.mobile.js.requirejs.options.out %>', + '<%= pkg.mobile.css.ios.dist %>', + '<%= pkg.mobile.css.material.dist %>'], + overwrite: true, + replacements: [{ + from: /(?:\.{2}\/){4}common\/mobile\/resources\/img/g, + to: '../img' + },{ + from: /(?:\.{2}\/){2}common\/mobile/g, + to: '../mobile' + }] } } }); @@ -367,9 +381,16 @@ module.exports = function(grunt) { grunt.registerTask('deploy-jsrsasign', ['jsrsasign-init', 'clean', 'copy']); grunt.registerTask('deploy-requirejs', ['requirejs-init', 'clean', 'uglify']); - grunt.registerTask('deploy-app-main', ['main-app-init', 'clean', 'imagemin', 'less', 'requirejs', 'concat', 'copy', 'replace:writeVersion']); - grunt.registerTask('deploy-app-mobile', ['mobile-app-init', 'clean:deploy', 'cssmin:styles', 'copy:template-backup', 'htmlmin', 'requirejs', 'concat', 'copy:template-restore', 'clean:template-backup', 'copy:localization', 'copy:index-page', 'copy:images-app', 'replace:writeVersion']); - grunt.registerTask('deploy-app-embed', ['embed-app-init', 'clean:prebuild', 'uglify', 'less', 'copy', 'clean:postbuild']); + grunt.registerTask('deploy-app-main', ['main-app-init', 'clean', 'imagemin', 'less', 'requirejs', 'concat', + 'copy', 'replace:writeVersion']); + + grunt.registerTask('deploy-app-mobile', ['mobile-app-init', 'clean:deploy', 'cssmin', 'copy:template-backup', + 'htmlmin', 'requirejs', 'concat', 'copy:template-restore', + 'clean:template-backup', 'copy:localization', 'copy:index-page', + 'copy:images-app', 'replace:writeVersion', 'replace:fixResourceUrl']); + + grunt.registerTask('deploy-app-embed', ['embed-app-init', 'clean:prebuild', 'uglify', 'less', 'copy', + 'clean:postbuild']); doRegisterInitializeAppTask('documenteditor', 'DocumentEditor', 'documenteditor.json'); diff --git a/build/package.json b/build/package.json index e11d90655..e30af30dc 100644 --- a/build/package.json +++ b/build/package.json @@ -20,7 +20,7 @@ "grunt-contrib-uglify": "^0.8.1", "grunt-contrib-concat": "^0.5.1", "grunt-contrib-imagemin": "^1.0.0", - "grunt-contrib-cssmin": "^0.12.2", + "grunt-contrib-cssmin": "^1.0.0", "grunt-contrib-htmlmin": "^2.0.0", "vinyl-fs": "2.2.1", "less-plugin-clean-css": "1.5.0" diff --git a/build/spreadsheeteditor.json b/build/spreadsheeteditor.json index cf310b5b3..29b178747 100644 --- a/build/spreadsheeteditor.json +++ b/build/spreadsheeteditor.json @@ -396,6 +396,12 @@ { "expand": true, "cwd": "../apps/spreadsheeteditor/mobile/resources/img/", + "src": "**/*.png", + "dest": "../deploy/web-apps/apps/spreadsheeteditor/mobile/resources/img/" + }, + { + "expand": true, + "cwd": "../apps/common/mobile/resources/img/", "src": "**", "dest": "../deploy/web-apps/apps/spreadsheeteditor/mobile/resources/img/" }