[mobile] debug deployment

This commit is contained in:
Maxim Kadushkin 2017-02-02 18:04:42 +03:00
parent d325acee07
commit e09e52be93
3 changed files with 32 additions and 5 deletions

View file

@ -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');

View file

@ -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"

View file

@ -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/"
}