Commit 1cafb105 authored by Alexander.Trofimov's avatar Alexander.Trofimov

add mobile banners files to build

parent 15857f1c
...@@ -72,10 +72,12 @@ module.exports = function(grunt) { ...@@ -72,10 +72,12 @@ module.exports = function(grunt) {
grunt.file.mkdir( packageFile['compile']['sdk']['log'] ); grunt.file.mkdir( packageFile['compile']['sdk']['log'] );
var map_file_path = packageFile['compile']['sdk']['dst'] + '.map'; var map_file_path = packageFile['compile']['sdk']['dst'] + '.map';
var map_record_file_path = map_file_path + '.tmp'; var map_record_file_path = map_file_path + '.tmp';
var tmp_sdk_path = packageFile['compile']['sdk']['dst'] + '.tmp';
var concat_src = [ var concat_src = [
packageFile['compile']['sdk']['dst'], packageFile['compile']['sdk']['dst'],
packageFile['compile']['defines']['dst'], packageFile['compile']['defines']['dst'],
map_record_file_path ]; map_record_file_path ];
var concat_src_with_banner_file = [];
var srcFiles = packageFile['compile']['sdk']['common']; var srcFiles = packageFile['compile']['sdk']['common'];
var sdkOpt = { var sdkOpt = {
compilation_level: compilation_level, compilation_level: compilation_level,
...@@ -103,6 +105,7 @@ module.exports = function(grunt) { ...@@ -103,6 +105,7 @@ module.exports = function(grunt) {
if(mobileFiles){ if(mobileFiles){
srcFiles = mobileFiles.concat(srcFiles); srcFiles = mobileFiles.concat(srcFiles);
} }
concat_src_with_banner_file = concat_src_with_banner_file.concat(packageFile['compile']['sdk']['mobile_banners']);
} }
if (!grunt.option('noprivate')) { if (!grunt.option('noprivate')) {
...@@ -112,6 +115,8 @@ module.exports = function(grunt) { ...@@ -112,6 +115,8 @@ module.exports = function(grunt) {
srcFiles = srcFiles.concat(packageFile['compile']['sdk']['desktop']); srcFiles = srcFiles.concat(packageFile['compile']['sdk']['desktop']);
} }
concat_src_with_banner_file = concat_src_with_banner_file.concat(tmp_sdk_path)
grunt.initConfig({ grunt.initConfig({
pkg: packageFile, pkg: packageFile,
'closure-compiler': { 'closure-compiler': {
...@@ -129,18 +134,23 @@ module.exports = function(grunt) { ...@@ -129,18 +134,23 @@ module.exports = function(grunt) {
} }
}, },
concat: { concat: {
sdk: {
options: { options: {
banner: '(function(window, undefined) {', banner: '(function(window, undefined) {',
footer: '})(window);' footer: '})(window);'
}, },
dist: {
src: concat_src, src: concat_src,
dest: tmp_sdk_path
},
bannerFile: {
src: concat_src_with_banner_file,
dest: '<%= pkg.compile.sdk.dst %>' dest: '<%= pkg.compile.sdk.dst %>'
} }
}, },
clean: [ clean: [
packageFile['compile']['defines']['dst'], packageFile['compile']['defines']['dst'],
map_record_file_path map_record_file_path,
tmp_sdk_path
], ],
replace: { replace: {
version: { version: {
...@@ -161,5 +171,5 @@ module.exports = function(grunt) { ...@@ -161,5 +171,5 @@ module.exports = function(grunt) {
grunt.registerTask('compile_sdk', ['compile_sdk_init:' + level, 'closure-compiler', 'concat', 'replace', 'clean']); grunt.registerTask('compile_sdk', ['compile_sdk_init:' + level, 'closure-compiler', 'concat', 'replace', 'clean']);
grunt.registerTask('compile_sdk_native', ['compile_sdk_init:' + level, 'closure-compiler:sdk', 'concat', 'replace', 'clean']); grunt.registerTask('compile_sdk_native', ['compile_sdk_init:' + level, 'closure-compiler:sdk', 'concat', 'replace', 'clean']);
grunt.registerTask('default', ['build_all']); grunt.registerTask('default', ['build_webpowerpoint']);
}; };
\ No newline at end of file
...@@ -167,6 +167,7 @@ ...@@ -167,6 +167,7 @@
"../common/Local/common.js", "../common/Local/common.js",
"../cell/Local/api.js" "../cell/Local/api.js"
], ],
"mobile_banners": [],
"exclude_mobile": [], "exclude_mobile": [],
"dst": "../cell/sdk-all.js", "dst": "../cell/sdk-all.js",
"externs": [ "externs": [
......
...@@ -150,6 +150,9 @@ ...@@ -150,6 +150,9 @@
"../common/Local/common.js", "../common/Local/common.js",
"../slide/Local/api.js" "../slide/Local/api.js"
], ],
"mobile_banners": [
"../slide/Native/native.js"
],
"mobile": [ "mobile": [
"../../web-apps/vendor/xregexp/xregexp-all-min.js", "../../web-apps/vendor/xregexp/xregexp-all-min.js",
"../common/browser.js", "../common/browser.js",
...@@ -158,7 +161,6 @@ ...@@ -158,7 +161,6 @@
"../common/Native/Wrappers/DrawingStream.js", "../common/Native/Wrappers/DrawingStream.js",
"../common/Native/Wrappers/ShapeDrawer.js", "../common/Native/Wrappers/ShapeDrawer.js",
"../common/Native/Wrappers/Overlay.js", "../common/Native/Wrappers/Overlay.js",
"../slide/Native/native.js",
"../slide/Native/Wrappers/api.js", "../slide/Native/Wrappers/api.js",
"../slide/Native/Wrappers/HtmlPage.js", "../slide/Native/Wrappers/HtmlPage.js",
"../slide/Native/Wrappers/DrawingDocument.js" "../slide/Native/Wrappers/DrawingDocument.js"
......
...@@ -154,6 +154,7 @@ ...@@ -154,6 +154,7 @@
"../common/Local/common.js", "../common/Local/common.js",
"../word/Local/api.js" "../word/Local/api.js"
], ],
"mobile_banners": [],
"exclude_mobile": [], "exclude_mobile": [],
"dst": "../word/sdk-all.js", "dst": "../word/sdk-all.js",
"externs": [ "externs": [
......
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