Commit e46e1cf4 authored by Alexander.Trofimov's avatar Alexander.Trofimov

split on PRETTY_PRINT and WHITESPACE_ONLY

parent aefef95b
......@@ -69,6 +69,7 @@ module.exports = function(grunt) {
grunt.registerTask('build_all', ['build_webword_init', 'build_sdk', 'build_webexcel_init', 'build_sdk', 'build_webpowerpoint_init', 'build_sdk']);
grunt.registerTask('compile_sdk_init', function(compilation_level) {
var splitLine = '';
var tmp_sdk_path = 'sdk-js-tmp.js';
var sdkDstFolder = packageFile['compile']['sdk']['dst'];
var sdkAllDst = sdkDstFolder + '/sdk-all.js';
......@@ -82,6 +83,11 @@ module.exports = function(grunt) {
if (formatting) {
sdkOpt['formatting'] = formatting;
}
if ('ADVANCED' === compilation_level) {
splitLine = ('PRETTY_PRINT' === formatting) ? 'window.split = "split";' : 'window.split="split";';
} else {
splitLine = ('PRETTY_PRINT' === formatting) ? 'window["split"] = "split";' : 'window["split"]="split";';
}
if (grunt.option('mobile')) {
var excludeFiles = packageFile['compile']['sdk']['exclude_mobile']
......@@ -116,7 +122,7 @@ module.exports = function(grunt) {
splitfile: {
sdk: {
options: {
separator: 'window.split="split";',
separator: splitLine,
prefix: [ "sdk-all-min", "sdk-all" ]
},
dest: sdkDstFolder,
......
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