Commit 6ac13503 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix build sdk on x86 systems

parent 1d9dcf7f
module.exports = function(grunt) {
require('google-closure-compiler').grunt(grunt, ['-Xms2048m']);
var defaultConfig, packageFile;
var defaultConfig, packageFile;
var path = grunt.option('src') || './configs';
var level = grunt.option('level') || 'ADVANCED';
var formatting = grunt.option('formatting') || '';
require('google-closure-compiler').grunt(grunt, ['ADVANCED' === level ? '-Xms2048m' : '-Xms1024m']);
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-replace');
......@@ -121,22 +122,22 @@ module.exports = function(grunt) {
});
});
grunt.registerTask('compile_sdk_init', function(compilation_level) {
var sdkTmp = 'sdk-tmp.js'
grunt.registerTask('compile_sdk_init', function() {
var sdkTmp = 'sdk-tmp.js';
var splitLine = '';
var tmp_sdk_path = 'sdk-js-tmp.js';
var sdkDstFolder = packageFile['compile']['sdk']['dst'];
var sdkAllMinDst = sdkDstFolder + '/sdk-all-min.js';
var sdkAllDst = sdkDstFolder + '/sdk-all.js';
var sdkOpt = {
compilation_level: compilation_level,
compilation_level: level,
warning_level: 'QUIET',
externs: packageFile['compile']['sdk']['externs']
};
if (formatting) {
sdkOpt['formatting'] = formatting;
}
if ('ADVANCED' === compilation_level) {
if ('ADVANCED' === level) {
splitLine = ('PRETTY_PRINT' === formatting) ? 'window.split = "split";' : 'window.split="split";';
} else {
splitLine = ('PRETTY_PRINT' === formatting) ? 'window["split"] = "split";' : 'window["split"]="split";';
......@@ -191,6 +192,6 @@ module.exports = function(grunt) {
});
grunt.registerTask('concat_sdk', ['concat_sdk_init', 'concat', 'clean']);
grunt.registerTask('compile_sdk', ['concat_sdk', 'compile_sdk_init:' + level, 'closure-compiler', 'splitfile', 'concat', 'replace', 'clean']);
grunt.registerTask('compile_sdk', ['concat_sdk', 'compile_sdk_init', 'closure-compiler', 'splitfile', 'concat', 'replace', 'clean']);
grunt.registerTask('default', ['build_all']);
};
\ No newline at end of file
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