Commit e09e52be authored by Maxim Kadushkin's avatar Maxim Kadushkin

[mobile] debug deployment

parent d325acee
...@@ -247,7 +247,8 @@ module.exports = function(grunt) { ...@@ -247,7 +247,8 @@ module.exports = function(grunt) {
}, },
cssmin: { cssmin: {
styles: { // options: {level: { 1: { roundingPrecision: 'all=3' }}}, // to round fw7 numbers in styles. need clean-css 4.0
target: {
files: { files: {
"<%= pkg.mobile.css.ios.dist %>" : packageFile['mobile']['css']['ios']['src'], "<%= pkg.mobile.css.ios.dist %>" : packageFile['mobile']['css']['ios']['src'],
"<%= pkg.mobile.css.material.dist %>" : packageFile['mobile']['css']['material']['src'] "<%= pkg.mobile.css.material.dist %>" : packageFile['mobile']['css']['material']['src']
...@@ -293,6 +294,19 @@ module.exports = function(grunt) { ...@@ -293,6 +294,19 @@ module.exports = function(grunt) {
return packageFile.version; 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) { ...@@ -367,9 +381,16 @@ module.exports = function(grunt) {
grunt.registerTask('deploy-jsrsasign', ['jsrsasign-init', 'clean', 'copy']); grunt.registerTask('deploy-jsrsasign', ['jsrsasign-init', 'clean', 'copy']);
grunt.registerTask('deploy-requirejs', ['requirejs-init', 'clean', 'uglify']); 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-main', ['main-app-init', 'clean', 'imagemin', 'less', 'requirejs', 'concat',
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']); 'copy', 'replace:writeVersion']);
grunt.registerTask('deploy-app-embed', ['embed-app-init', 'clean:prebuild', 'uglify', 'less', 'copy', 'clean:postbuild']);
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'); doRegisterInitializeAppTask('documenteditor', 'DocumentEditor', 'documenteditor.json');
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"grunt-contrib-uglify": "^0.8.1", "grunt-contrib-uglify": "^0.8.1",
"grunt-contrib-concat": "^0.5.1", "grunt-contrib-concat": "^0.5.1",
"grunt-contrib-imagemin": "^1.0.0", "grunt-contrib-imagemin": "^1.0.0",
"grunt-contrib-cssmin": "^0.12.2", "grunt-contrib-cssmin": "^1.0.0",
"grunt-contrib-htmlmin": "^2.0.0", "grunt-contrib-htmlmin": "^2.0.0",
"vinyl-fs": "2.2.1", "vinyl-fs": "2.2.1",
"less-plugin-clean-css": "1.5.0" "less-plugin-clean-css": "1.5.0"
......
...@@ -396,6 +396,12 @@ ...@@ -396,6 +396,12 @@
{ {
"expand": true, "expand": true,
"cwd": "../apps/spreadsheeteditor/mobile/resources/img/", "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": "**", "src": "**",
"dest": "../deploy/web-apps/apps/spreadsheeteditor/mobile/resources/img/" "dest": "../deploy/web-apps/apps/spreadsheeteditor/mobile/resources/img/"
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment