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

add option noclosure

parent e41b0247
...@@ -61,11 +61,14 @@ module.exports = function(grunt) { ...@@ -61,11 +61,14 @@ module.exports = function(grunt) {
var sdkTmp = 'sdk-tmp.js', sdkAllTmp = 'sdk-all-tmp.js', sdkAllMinTmp = 'sdk-all-min-tmp.js'; var sdkTmp = 'sdk-tmp.js', sdkAllTmp = 'sdk-all-tmp.js', sdkAllMinTmp = 'sdk-all-min-tmp.js';
var srcFilesMin = packageFile['compile']['sdk']['min']; var srcFilesMin = packageFile['compile']['sdk']['min'];
var srcFilesAll = packageFile['compile']['sdk']['common']; var srcFilesAll = packageFile['compile']['sdk']['common'];
var sdkOpt = { var sdkOpt = {};
compilation_level: 'WHITESPACE_ONLY',
warning_level: 'QUIET', if (!grunt.option('noclosure')) {
externs: packageFile['compile']['sdk']['externs'] sdkOpt = {
banner: '(function(window, undefined) {',
footer: '})(window);'
}; };
}
if (grunt.option('mobile')) { if (grunt.option('mobile')) {
srcFilesMin = packageFile['compile']['sdk']['mobile_banners']['min'].concat(srcFilesMin); srcFilesMin = packageFile['compile']['sdk']['mobile_banners']['min'].concat(srcFilesMin);
...@@ -105,10 +108,7 @@ module.exports = function(grunt) { ...@@ -105,10 +108,7 @@ module.exports = function(grunt) {
dest: sdkAllMinTmp dest: sdkAllMinTmp
}, },
sdk: { sdk: {
options: { options: sdkOpt,
banner: '(function(window, undefined) {',
footer: '})(window);'
},
src: srcFilesAll, src: srcFilesAll,
dest: sdkAllTmp dest: sdkAllTmp
}, },
......
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