[all mobile] added version info in production js
This commit is contained in:
parent
e949655e8e
commit
b5b8dca3a6
|
@ -4,7 +4,7 @@ module.exports = function(grunt) {
|
||||||
packageFile;
|
packageFile;
|
||||||
|
|
||||||
const copyrightHeader = 'Copyright (c) Ascensio System SIA <%= grunt.template.today("yyyy") %>. All rights reserved'
|
const copyrightHeader = 'Copyright (c) Ascensio System SIA <%= grunt.template.today("yyyy") %>. All rights reserved'
|
||||||
var copyright = '/*\n' +
|
var copyright = '/*!\n' +
|
||||||
' * ' + (process.env['APP_COPYRIGHT'] || copyrightHeader) + '\n' +
|
' * ' + (process.env['APP_COPYRIGHT'] || copyrightHeader) + '\n' +
|
||||||
' *\n' +
|
' *\n' +
|
||||||
' * <%= pkg.homepage %> \n' +
|
' * <%= pkg.homepage %> \n' +
|
||||||
|
@ -432,11 +432,6 @@ module.exports = function(grunt) {
|
||||||
'template-backup': packageFile.mobile.copy['template-backup'][0].dest
|
'template-backup': packageFile.mobile.copy['template-backup'][0].dest
|
||||||
},
|
},
|
||||||
|
|
||||||
requirejs: {
|
|
||||||
compile: {
|
|
||||||
options: packageFile['mobile']['js']['requirejs']['options']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
concat: {
|
concat: {
|
||||||
options: {
|
options: {
|
||||||
|
@ -444,8 +439,8 @@ module.exports = function(grunt) {
|
||||||
banner: copyright
|
banner: copyright
|
||||||
},
|
},
|
||||||
dist: {
|
dist: {
|
||||||
src: packageFile.mobile.js.requirejs.options.out,
|
src: packageFile.mobile.js.dest,
|
||||||
dest: packageFile.mobile.js.requirejs.options.out
|
dest: packageFile.mobile.js.dest
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -498,29 +493,29 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
replace: {
|
// replace: {
|
||||||
writeVersion: {
|
// writeVersion: {
|
||||||
src: ['<%= pkg.mobile.js.requirejs.options.out %>'],
|
// src: ['<%= pkg.mobile.js.requirejs.options.out %>'],
|
||||||
overwrite: true,
|
// overwrite: true,
|
||||||
replacements: [{
|
// replacements: [{
|
||||||
from: /\{\{PRODUCT_VERSION\}\}/,
|
// from: /\{\{PRODUCT_VERSION\}\}/,
|
||||||
to: packageFile.version
|
// to: packageFile.version
|
||||||
}]
|
// }]
|
||||||
},
|
// },
|
||||||
fixResourceUrl: {
|
// fixResourceUrl: {
|
||||||
src: ['<%= pkg.mobile.js.requirejs.options.out %>',
|
// src: ['<%= pkg.mobile.js.requirejs.options.out %>',
|
||||||
'<%= pkg.mobile.css.ios.dist %>',
|
// '<%= pkg.mobile.css.ios.dist %>',
|
||||||
'<%= pkg.mobile.css.material.dist %>'],
|
// '<%= pkg.mobile.css.material.dist %>'],
|
||||||
overwrite: true,
|
// overwrite: true,
|
||||||
replacements: [{
|
// replacements: [{
|
||||||
from: /(?:\.{2}\/){4}common\/mobile\/resources\/img/g,
|
// from: /(?:\.{2}\/){4}common\/mobile\/resources\/img/g,
|
||||||
to: '../img'
|
// to: '../img'
|
||||||
},{
|
// },{
|
||||||
from: /(?:\.{2}\/){2}common\/mobile/g,
|
// from: /(?:\.{2}\/){2}common\/mobile/g,
|
||||||
to: '../mobile'
|
// to: '../mobile'
|
||||||
}]
|
// }]
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
exec: {
|
exec: {
|
||||||
webpack_app_build: {
|
webpack_app_build: {
|
||||||
|
@ -542,9 +537,9 @@ module.exports = function(grunt) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var replace = grunt.config.get('replace');
|
// var replace = grunt.config.get('replace');
|
||||||
replace.writeVersion.replacements.push(...jsreplacements);
|
// replace.writeVersion.replacements.push(...jsreplacements);
|
||||||
grunt.config.set('replace', replace);
|
// grunt.config.set('replace', replace);
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.registerTask('embed-app-init', function() {
|
grunt.registerTask('embed-app-init', function() {
|
||||||
|
@ -629,10 +624,10 @@ module.exports = function(grunt) {
|
||||||
'replace:writeVersion', 'replace:prepareHelp', 'clean:postbuild']);
|
'replace:writeVersion', 'replace:prepareHelp', 'clean:postbuild']);
|
||||||
|
|
||||||
grunt.registerTask('deploy-app-mobile', ['mobile-app-init', 'clean:deploy', /*'cssmin',*/ /*'copy:template-backup',*/
|
grunt.registerTask('deploy-app-mobile', ['mobile-app-init', 'clean:deploy', /*'cssmin',*/ /*'copy:template-backup',*/
|
||||||
'htmlmin', /*'requirejs',*/ 'exec:webpack_install', 'exec:webpack_app_build', /*'concat',*/ /*'copy:template-restore',*/
|
'htmlmin', /*'requirejs',*/ 'exec:webpack_install', 'exec:webpack_app_build', /*'copy:template-restore',*/
|
||||||
/*'clean:template-backup',*/ 'copy:localization', 'copy:index-page',
|
/*'clean:template-backup',*/ 'copy:localization', 'copy:index-page',
|
||||||
'copy:images-app', 'copy:webpack-dist', 'json-minify',
|
'copy:images-app', 'copy:webpack-dist', 'concat', 'json-minify'/*,*/
|
||||||
'replace:writeVersion', 'replace:fixResourceUrl']);
|
/*'replace:writeVersion', 'replace:fixResourceUrl'*/]);
|
||||||
|
|
||||||
grunt.registerTask('deploy-app-embed', ['embed-app-init', 'clean:prebuild', 'uglify', 'less', 'copy',
|
grunt.registerTask('deploy-app-embed', ['embed-app-init', 'clean:prebuild', 'uglify', 'less', 'copy',
|
||||||
'clean:postbuild']);
|
'clean:postbuild']);
|
||||||
|
|
|
@ -218,98 +218,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"js": {
|
"js": {
|
||||||
"requirejs": {
|
"src": "../apps/documenteditor/mobile/dist/js/app.js",
|
||||||
"options": {
|
"dest": "../deploy/web-apps/apps/documenteditor/mobile/dist/js/app.js"
|
||||||
"name": "../apps/documenteditor/mobile/app.js",
|
|
||||||
"out": "../deploy/web-apps/apps/documenteditor/mobile/app.js",
|
|
||||||
"baseUrl": "../apps/",
|
|
||||||
"inlineText": true,
|
|
||||||
"findNestedDependencies": true,
|
|
||||||
"preserveLicenseComments": false,
|
|
||||||
"optimizeAllPluginResources": true,
|
|
||||||
"paths": {
|
|
||||||
"jquery": "../vendor/jquery/jquery",
|
|
||||||
"underscore": "../vendor/underscore/underscore",
|
|
||||||
"backbone": "../vendor/backbone/backbone",
|
|
||||||
"framework7": "../vendor/framework7/js/framework7",
|
|
||||||
"text": "../vendor/requirejs-text/text",
|
|
||||||
"xregexp": "empty:",
|
|
||||||
"sockjs": "empty:",
|
|
||||||
"jszip": "empty:",
|
|
||||||
"jszip-utils": "empty:",
|
|
||||||
"coapisettings": "empty:",
|
|
||||||
"allfonts": "empty:",
|
|
||||||
"sdk": "empty:",
|
|
||||||
"api": "empty:",
|
|
||||||
"core": "common/main/lib/core/application",
|
|
||||||
"extendes": "common/mobile/utils/extendes",
|
|
||||||
"notification": "common/main/lib/core/NotificationCenter",
|
|
||||||
"localstorage": "common/main/lib/util/LocalStorage",
|
|
||||||
"analytics": "common/Analytics",
|
|
||||||
"gateway": "common/Gateway",
|
|
||||||
"locale": "common/locale",
|
|
||||||
"irregularstack": "common/IrregularStack",
|
|
||||||
"sharedsettings": "common/mobile/utils/SharedSettings"
|
|
||||||
},
|
|
||||||
"shim": {
|
|
||||||
"framework7": {
|
|
||||||
"exports": "Framework7"
|
|
||||||
},
|
|
||||||
"underscore": {
|
|
||||||
"exports": "_"
|
|
||||||
},
|
|
||||||
"backbone": {
|
|
||||||
"deps": [
|
|
||||||
"underscore",
|
|
||||||
"jquery"
|
|
||||||
],
|
|
||||||
"exports": "Backbone"
|
|
||||||
},
|
|
||||||
"notification": {
|
|
||||||
"deps": [
|
|
||||||
"backbone"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"core": {
|
|
||||||
"deps": [
|
|
||||||
"backbone",
|
|
||||||
"notification",
|
|
||||||
"irregularstack",
|
|
||||||
"sharedsettings"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"extendes": {
|
|
||||||
"deps": [
|
|
||||||
"underscore",
|
|
||||||
"jquery",
|
|
||||||
"framework7"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"sdk": {
|
|
||||||
"deps": [
|
|
||||||
"jquery",
|
|
||||||
"underscore",
|
|
||||||
"coapisettings",
|
|
||||||
"allfonts",
|
|
||||||
"xregexp",
|
|
||||||
"sockjs",
|
|
||||||
"jszip",
|
|
||||||
"jszip-utils"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"gateway": {
|
|
||||||
"deps": [
|
|
||||||
"jquery"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"analytics": {
|
|
||||||
"deps": [
|
|
||||||
"jquery"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"css": {
|
"css": {
|
||||||
"ios": {
|
"ios": {
|
||||||
|
|
|
@ -222,98 +222,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"js": {
|
"js": {
|
||||||
"requirejs": {
|
"src": "../apps/presentationeditor/mobile/dist/js/app.js",
|
||||||
"options": {
|
"dest": "../deploy/web-apps/apps/presentationeditor/mobile/dist/js/app.js"
|
||||||
"name": "../apps/presentationeditor/mobile/app.js",
|
|
||||||
"out": "../deploy/web-apps/apps/presentationeditor/mobile/app.js",
|
|
||||||
"baseUrl": "../apps/",
|
|
||||||
"inlineText": true,
|
|
||||||
"findNestedDependencies": true,
|
|
||||||
"preserveLicenseComments": false,
|
|
||||||
"optimizeAllPluginResources": true,
|
|
||||||
"paths": {
|
|
||||||
"jquery": "../vendor/jquery/jquery",
|
|
||||||
"underscore": "../vendor/underscore/underscore",
|
|
||||||
"backbone": "../vendor/backbone/backbone",
|
|
||||||
"framework7": "../vendor/framework7/js/framework7",
|
|
||||||
"text": "../vendor/requirejs-text/text",
|
|
||||||
"xregexp": "empty:",
|
|
||||||
"sockjs": "empty:",
|
|
||||||
"jszip": "empty:",
|
|
||||||
"jszip-utils": "empty:",
|
|
||||||
"coapisettings": "empty:",
|
|
||||||
"allfonts": "empty:",
|
|
||||||
"sdk": "empty:",
|
|
||||||
"api": "empty:",
|
|
||||||
"core": "common/main/lib/core/application",
|
|
||||||
"extendes": "common/mobile/utils/extendes",
|
|
||||||
"notification": "common/main/lib/core/NotificationCenter",
|
|
||||||
"localstorage": "common/main/lib/util/LocalStorage",
|
|
||||||
"analytics": "common/Analytics",
|
|
||||||
"gateway": "common/Gateway",
|
|
||||||
"locale": "common/locale",
|
|
||||||
"irregularstack": "common/IrregularStack",
|
|
||||||
"sharedsettings": "common/mobile/utils/SharedSettings"
|
|
||||||
},
|
|
||||||
"shim": {
|
|
||||||
"framework7": {
|
|
||||||
"exports": "Framework7"
|
|
||||||
},
|
|
||||||
"underscore": {
|
|
||||||
"exports": "_"
|
|
||||||
},
|
|
||||||
"backbone": {
|
|
||||||
"deps": [
|
|
||||||
"underscore",
|
|
||||||
"jquery"
|
|
||||||
],
|
|
||||||
"exports": "Backbone"
|
|
||||||
},
|
|
||||||
"notification": {
|
|
||||||
"deps": [
|
|
||||||
"backbone"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"core": {
|
|
||||||
"deps": [
|
|
||||||
"backbone",
|
|
||||||
"notification",
|
|
||||||
"irregularstack",
|
|
||||||
"sharedsettings"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"extendes": {
|
|
||||||
"deps": [
|
|
||||||
"underscore",
|
|
||||||
"jquery",
|
|
||||||
"framework7"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"sdk": {
|
|
||||||
"deps": [
|
|
||||||
"jquery",
|
|
||||||
"underscore",
|
|
||||||
"coapisettings",
|
|
||||||
"allfonts",
|
|
||||||
"xregexp",
|
|
||||||
"sockjs",
|
|
||||||
"jszip",
|
|
||||||
"jszip-utils"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"gateway": {
|
|
||||||
"deps": [
|
|
||||||
"jquery"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"analytics": {
|
|
||||||
"deps": [
|
|
||||||
"jquery"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"css": {
|
"css": {
|
||||||
"ios": {
|
"ios": {
|
||||||
|
|
|
@ -223,98 +223,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"js": {
|
"js": {
|
||||||
"requirejs": {
|
"src": "../apps/spreadsheeteditor/mobile/dist/js/app.js",
|
||||||
"options": {
|
"dest": "../deploy/web-apps/apps/spreadsheeteditor/mobile/dist/js/app.js"
|
||||||
"name": "../apps/spreadsheeteditor/mobile/app.js",
|
|
||||||
"out": "../deploy/web-apps/apps/spreadsheeteditor/mobile/app.js",
|
|
||||||
"baseUrl": "../apps/",
|
|
||||||
"inlineText": true,
|
|
||||||
"findNestedDependencies": true,
|
|
||||||
"preserveLicenseComments": false,
|
|
||||||
"optimizeAllPluginResources": true,
|
|
||||||
"paths": {
|
|
||||||
"jquery": "../vendor/jquery/jquery",
|
|
||||||
"underscore": "../vendor/underscore/underscore",
|
|
||||||
"backbone": "../vendor/backbone/backbone",
|
|
||||||
"framework7": "../vendor/framework7/js/framework7",
|
|
||||||
"text": "../vendor/requirejs-text/text",
|
|
||||||
"xregexp": "empty:",
|
|
||||||
"sockjs": "empty:",
|
|
||||||
"jszip": "empty:",
|
|
||||||
"jszip-utils": "empty:",
|
|
||||||
"coapisettings": "empty:",
|
|
||||||
"allfonts": "empty:",
|
|
||||||
"sdk": "empty:",
|
|
||||||
"api": "empty:",
|
|
||||||
"core": "common/main/lib/core/application",
|
|
||||||
"extendes": "common/mobile/utils/extendes",
|
|
||||||
"notification": "common/main/lib/core/NotificationCenter",
|
|
||||||
"localstorage": "common/main/lib/util/LocalStorage",
|
|
||||||
"analytics": "common/Analytics",
|
|
||||||
"gateway": "common/Gateway",
|
|
||||||
"locale": "common/locale",
|
|
||||||
"irregularstack": "common/IrregularStack",
|
|
||||||
"sharedsettings": "common/mobile/utils/SharedSettings"
|
|
||||||
},
|
|
||||||
"shim": {
|
|
||||||
"framework7": {
|
|
||||||
"exports": "Framework7"
|
|
||||||
},
|
|
||||||
"underscore": {
|
|
||||||
"exports": "_"
|
|
||||||
},
|
|
||||||
"backbone": {
|
|
||||||
"deps": [
|
|
||||||
"underscore",
|
|
||||||
"jquery"
|
|
||||||
],
|
|
||||||
"exports": "Backbone"
|
|
||||||
},
|
|
||||||
"notification": {
|
|
||||||
"deps": [
|
|
||||||
"backbone"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"core": {
|
|
||||||
"deps": [
|
|
||||||
"backbone",
|
|
||||||
"notification",
|
|
||||||
"irregularstack",
|
|
||||||
"sharedsettings"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"extendes": {
|
|
||||||
"deps": [
|
|
||||||
"underscore",
|
|
||||||
"jquery",
|
|
||||||
"framework7"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"sdk": {
|
|
||||||
"deps": [
|
|
||||||
"jquery",
|
|
||||||
"underscore",
|
|
||||||
"coapisettings",
|
|
||||||
"allfonts",
|
|
||||||
"xregexp",
|
|
||||||
"sockjs",
|
|
||||||
"jszip",
|
|
||||||
"jszip-utils"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"gateway": {
|
|
||||||
"deps": [
|
|
||||||
"jquery"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"analytics": {
|
|
||||||
"deps": [
|
|
||||||
"jquery"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"css": {
|
"css": {
|
||||||
"ios": {
|
"ios": {
|
||||||
|
|
Loading…
Reference in a new issue