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

Сборку перевел на google-closure-compiler модуль

parent 96440f23
module.exports = function(grunt) { module.exports = function(grunt) {
require('google-closure-compiler').grunt(grunt);
var revision="unknown", defaultConfig, packageFile, toolsConfig, toolsFile; var revision="unknown", defaultConfig, packageFile, toolsConfig, toolsFile;
var path = require('path'); var path = require('path');
...@@ -7,7 +8,6 @@ module.exports = function(grunt) { ...@@ -7,7 +8,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-exec'); grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-closure-tools');
grunt.loadNpmTasks('grunt-replace'); grunt.loadNpmTasks('grunt-replace');
grunt.registerTask('get_svn_info', 'Initialize svn information', function () { grunt.registerTask('get_svn_info', 'Initialize svn information', function () {
...@@ -205,32 +205,27 @@ module.exports = function(grunt) { ...@@ -205,32 +205,27 @@ module.exports = function(grunt) {
packageFile['compile']['defines']['dst'], packageFile['compile']['defines']['dst'],
map_record_file_path ]; map_record_file_path ];
grunt.initConfig({ grunt.initConfig({
closureCompiler: { pkg: grunt.file.readJSON(defaultConfig),
'closure-compiler': {
build: {
files: {
'<%= pkg.compile.sdk.dst %>': packageFile['compile']['sdk']['src']
},
options: { options: {
compilerFile: compilerFile,
javaFlags: ['-Xms2048m']
},
sdk: {
TEMPcompilerOpts: {
compilation_level: compilation_level, compilation_level: compilation_level,
warning_level: 'QUIET',
externs: packageFile['compile']['sdk']['externs'], externs: packageFile['compile']['sdk']['externs'],
define: packageFile['compile']['sdk']['define'],
warning_level: 'QUIET',
variable_renaming_report: packageFile['compile']['sdk']['log'] + '/variable.map', variable_renaming_report: packageFile['compile']['sdk']['log'] + '/variable.map',
property_renaming_report: packageFile['compile']['sdk']['log'] + '/property.map'/*, property_renaming_report: packageFile['compile']['sdk']['log'] + '/property.map'/*,
create_source_map: map_file_path, create_source_map: map_file_path,
source_map_format: "V3"*/ source_map_format: "V3"*/
}, },
src: packageFile['compile']['sdk']['src'],
dest: packageFile['compile']['sdk']['dst']
},
defines: { defines: {
TEMPcompilerOpts: { options: {
compilation_level: 'SIMPLE', compilation_level: 'SIMPLE',
warning_level: 'QUIET' warning_level: 'QUIET'
}, }
src: packageFile['compile']['defines']['src'], }
dest: packageFile['compile']['defines']['dst']
} }
}, },
create_map_file: {}, create_map_file: {},
...@@ -239,7 +234,6 @@ module.exports = function(grunt) { ...@@ -239,7 +234,6 @@ module.exports = function(grunt) {
packageFile['compile']['defines']['dst'], packageFile['compile']['defines']['dst'],
map_record_file_path map_record_file_path
], ],
pkg: grunt.file.readJSON(defaultConfig),
replace: { replace: {
version: { version: {
options: { options: {
...@@ -257,11 +251,11 @@ module.exports = function(grunt) { ...@@ -257,11 +251,11 @@ module.exports = function(grunt) {
}); });
}); });
grunt.registerTask('compile_sdk', ['compile_sdk_init:ADVANCED', 'closureCompiler', 'concat', 'replace', 'clean']); grunt.registerTask('compile_sdk', ['compile_sdk_init:ADVANCED', 'closure-compiler', 'concat', 'replace', 'clean']);
grunt.registerTask('compile_sdk_fast', ['compile_sdk_init:WHITESPACE_ONLY', 'closureCompiler', 'concat', 'replace', 'clean']); grunt.registerTask('compile_sdk_fast', ['compile_sdk_init:WHITESPACE_ONLY', 'closure-compiler', 'concat', 'replace', 'clean']);
grunt.registerTask('compile_sdk_native', ['compile_sdk_init:ADVANCED', 'closureCompiler:sdk', 'concat', 'replace', 'clean']); grunt.registerTask('compile_sdk_native', ['compile_sdk_init:ADVANCED', 'closure-compiler:sdk', 'concat', 'replace', 'clean']);
grunt.registerTask('compile_sdk_native_fast', ['compile_sdk_init:WHITESPACE_ONLY', 'closureCompiler:sdk', 'concat', 'replace', 'clean']); grunt.registerTask('compile_sdk_native_fast', ['compile_sdk_init:WHITESPACE_ONLY', 'closure-compiler:sdk', 'concat', 'replace', 'clean']);
grunt.registerTask('deploy_sdk_init', function() { grunt.registerTask('deploy_sdk_init', function() {
grunt.initConfig({ grunt.initConfig({
......
{ {
"name": "common", "name": "common",
"version": "0.0.0", "version": "0.0.0",
"homepage": "http://www.teamlab.com", "homepage": "http://www.teamlab.com",
"private": true, "private": true,
"dependencies": { "dependencies": {
"grunt": "0.4.2", "google-closure-compiler": "^20160315.0.0",
"grunt-contrib-clean": "0.5.0", "grunt": "0.4.2",
"grunt-contrib-concat": "0.3.0", "grunt-contrib-clean": "0.5.0",
"grunt-contrib-copy": "0.5.0", "grunt-contrib-concat": "0.3.0",
"grunt-exec": "0.4.5", "grunt-contrib-copy": "0.5.0",
"grunt-replace": "0.7.3", "grunt-exec": "0.4.5",
"grunt-closure-tools": "0.9.9" "grunt-replace": "0.7.3"
} }
} }
\ No newline at end of file
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
"dst": "../../word/sdk-all.js", "dst": "../../word/sdk-all.js",
"externs": [ "externs": [
"../../common/Native/jquery_native.js", "../../common/Native/jquery_native.js",
"../../common/3rdparty/XRegExp/xregexp-all-min.js" "../../../web-apps/vendor/xregexp/xregexp-all-min.js"
], ],
"map": "sdk-all.js.map", "map": "sdk-all.js.map",
"log": "../../word/Build/Log" "log": "../../word/Build/Log"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"../../common/Charts/DrawingArea.js", "../../common/Charts/DrawingArea.js",
"../../common/Charts/DrawingObjects.js", "../../common/Charts/DrawingObjects.js",
"../../common/Charts/ChartsDrawer.js", "../../common/Charts/ChartsDrawer.js",
"../../common/Charts/3DTransformation.js", "../../common/Charts/3DTransformation.js",
"../../common/FontsFreeType/font_engine.js", "../../common/FontsFreeType/font_engine.js",
"../../common/FontsFreeType/FontFile.js", "../../common/FontsFreeType/FontFile.js",
"../../common/FontsFreeType/FontManager.js", "../../common/FontsFreeType/FontManager.js",
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"../../cell/model/ConditionalFormatting.js", "../../cell/model/ConditionalFormatting.js",
"../../cell/model/FormulaObjects/parserFormula.js", "../../cell/model/FormulaObjects/parserFormula.js",
"../../cell/model/FormulaObjects/_xlfnFunctions.js", "../../cell/model/FormulaObjects/_xlfnFunctions.js",
"../../cell/model/FormulaObjects/dateandtimeFunctions.js", "../../cell/model/FormulaObjects/dateandtimeFunctions.js",
"../../cell/model/FormulaObjects/engineeringFunctions.js", "../../cell/model/FormulaObjects/engineeringFunctions.js",
"../../cell/model/FormulaObjects/cubeFunctions.js", "../../cell/model/FormulaObjects/cubeFunctions.js",
"../../cell/model/FormulaObjects/databaseFunctions.js", "../../cell/model/FormulaObjects/databaseFunctions.js",
...@@ -133,10 +133,10 @@ ...@@ -133,10 +133,10 @@
"../../word/Editor/Document.js", "../../word/Editor/Document.js",
"../../word/Editor/DocumentContent.js", "../../word/Editor/DocumentContent.js",
"../../word/Editor/Table.js", "../../word/Editor/Table.js",
"../../word/Editor/Table/TableRecalculate.js", "../../word/Editor/Table/TableRecalculate.js",
"../../word/Editor/Table/TableDraw.js", "../../word/Editor/Table/TableDraw.js",
"../../word/Editor/Table/TableRow.js", "../../word/Editor/Table/TableRow.js",
"../../word/Editor/Table/TableCell.js", "../../word/Editor/Table/TableCell.js",
"../../word/Editor/Serialize2.js", "../../word/Editor/Serialize2.js",
"../../word/Editor/FontClassification.js", "../../word/Editor/FontClassification.js",
"../../word/Editor/Spelling.js", "../../word/Editor/Spelling.js",
...@@ -155,27 +155,27 @@ ...@@ -155,27 +155,27 @@
"../../word/Math/operators.js", "../../word/Math/operators.js",
"../../word/Math/accent.js", "../../word/Math/accent.js",
"../../word/Math/borderBox.js", "../../word/Math/borderBox.js",
"../../common/CollaborativeEditingBase.js", "../../common/CollaborativeEditingBase.js",
"../../cell/model/DrawingObjects/GlobalCounters.js", "../../cell/model/DrawingObjects/GlobalCounters.js",
"../../word/apiCommon.js", "../../word/apiCommon.js",
"../../cell/apiCommonExport.js", "../../cell/apiCommonExport.js",
"../../common/apiBase.js", "../../common/apiBase.js",
"../../cell/api.js", "../../cell/api.js",
"../../common/Private/license.js", "../../common/Private/license.js",
"../../cell/Private/comments.js" "../../cell/Private/comments.js"
], ],
"dst": "../../cell/sdk-all.js", "dst": "../../cell/sdk-all.js",
"externs": [ "externs": [
"../../common/Build/Externs.js", "../../common/Build/Externs.js",
"../../common/3rdparty/jquery/jquery.min.js", "../../../web-apps/vendor/jquery/jquery.min.js",
"../../common/3rdparty/Underscore/underscore-min.js", "../../../web-apps/vendor/underscore/underscore-min.js",
"../../common/3rdparty/Sockjs/sockjs.min.js", "../../../web-apps/vendor/sockjs/sockjs.min.js",
"../../common/3rdparty/XRegExp/xregexp-all-min.js", "../../../web-apps/vendor/xregexp/xregexp-all-min.js",
"../../common/3rdparty/jszip/jszip.min.js", "../../../web-apps/vendor/jszip/jszip.min.js",
"../../common/3rdparty/jszip-utils/jszip-utils.min.js", "../../../web-apps/vendor/jszip-utils/jszip-utils.min.js",
"../../common/3rdparty/jsrsasign/jsrsasign-latest-all-min.js", "../../../web-apps/vendor/jsrsasign/jsrsasign-latest-all-min.js",
"../../common/3rdparty/perfect-scrollbar/jquery.mousewheel.js", "../../../web-apps/vendor/perfect-scrollbar/src/jquery.mousewheel.js",
"../../common/3rdparty/perfect-scrollbar/perfect-scrollbar.js" "../../../web-apps/vendor/perfect-scrollbar/src/perfect-scrollbar.js"
], ],
"map": "sdk-all.js.map", "map": "sdk-all.js.map",
"log": "../../cell/Build/Log" "log": "../../cell/Build/Log"
......
...@@ -38,17 +38,17 @@ ...@@ -38,17 +38,17 @@
"../../word/Editor/Styles.js", "../../word/Editor/Styles.js",
"../../word/Editor/Numbering.js", "../../word/Editor/Numbering.js",
"../../word/Drawing/Metafile.js", "../../word/Drawing/Metafile.js",
"../../common/CollaborativeEditingBase.js", "../../common/CollaborativeEditingBase.js",
"../../slide/Editor/CollaborativeEditing.js", "../../slide/Editor/CollaborativeEditing.js",
"../../word/Drawing/GraphicsEvents.js", "../../word/Drawing/GraphicsEvents.js",
"../../word/Drawing/WorkEvents.js", "../../word/Drawing/WorkEvents.js",
"../../common/Controls.js", "../../common/Controls.js",
"../../word/Drawing/Rulers.js", "../../word/Drawing/Rulers.js",
"../../word/Editor/Table.js", "../../word/Editor/Table.js",
"../../word/Editor/Table/TableRecalculate.js", "../../word/Editor/Table/TableRecalculate.js",
"../../word/Editor/Table/TableDraw.js", "../../word/Editor/Table/TableDraw.js",
"../../word/Editor/Table/TableRow.js", "../../word/Editor/Table/TableRow.js",
"../../word/Editor/Table/TableCell.js", "../../word/Editor/Table/TableCell.js",
"../../word/Editor/Common.js", "../../word/Editor/Common.js",
"../../word/Editor/Sections.js", "../../word/Editor/Sections.js",
"../../common/scroll.js", "../../common/scroll.js",
...@@ -134,8 +134,8 @@ ...@@ -134,8 +134,8 @@
"../../slide/Editor/Format/GraphicFrame.js", "../../slide/Editor/Format/GraphicFrame.js",
"../../common/apiBase.js", "../../common/apiBase.js",
"../../slide/api.js", "../../slide/api.js",
"../../common/Private/license.js", "../../common/Private/license.js",
"../../slide/Private/comments.js", "../../slide/Private/comments.js",
"../../slide/apiCommon.js", "../../slide/apiCommon.js",
"../../word/apiCommon.js", "../../word/apiCommon.js",
"../../slide/apiExport.js", "../../slide/apiExport.js",
...@@ -150,13 +150,13 @@ ...@@ -150,13 +150,13 @@
"dst": "../../slide/sdk-all.js", "dst": "../../slide/sdk-all.js",
"externs": [ "externs": [
"../../common/Build/Externs.js", "../../common/Build/Externs.js",
"../../common/3rdparty/jquery/jquery.min.js", "../../../web-apps/vendor/jquery/jquery.min.js",
"../../common/3rdparty/Underscore/underscore-min.js", "../../../web-apps/vendor/underscore/underscore-min.js",
"../../common/3rdparty/Sockjs/sockjs.min.js", "../../../web-apps/vendor/sockjs/sockjs.min.js",
"../../common/3rdparty/XRegExp/xregexp-all-min.js", "../../../web-apps/vendor/xregexp/xregexp-all-min.js",
"../../common/3rdparty/jszip/jszip.min.js", "../../../web-apps/vendor/jszip/jszip.min.js",
"../../common/3rdparty/jszip-utils/jszip-utils.min.js", "../../../web-apps/vendor/jszip-utils/jszip-utils.min.js",
"../../common/3rdparty/jsrsasign/jsrsasign-latest-all-min.js" "../../../web-apps/vendor/jsrsasign/jsrsasign-latest-all-min.js"
], ],
"map": "sdk-all.js.map", "map": "sdk-all.js.map",
"log": "../../slide/Build/Log" "log": "../../slide/Build/Log"
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"../../word/Drawing/translations.js", "../../word/Drawing/translations.js",
"../../common/Charts/charts.js", "../../common/Charts/charts.js",
"../../common/Charts/ChartsDrawer.js", "../../common/Charts/ChartsDrawer.js",
"../../common/Charts/3DTransformation.js", "../../common/Charts/3DTransformation.js",
"../../common/Charts/DrawingArea.js", "../../common/Charts/DrawingArea.js",
"../../common/Charts/DrawingObjects.js", "../../common/Charts/DrawingObjects.js",
"../../common/NumFormat.js", "../../common/NumFormat.js",
...@@ -94,10 +94,10 @@ ...@@ -94,10 +94,10 @@
"../../word/Editor/Common.js", "../../word/Editor/Common.js",
"../../word/Editor/DocumentContent.js", "../../word/Editor/DocumentContent.js",
"../../word/Editor/Table.js", "../../word/Editor/Table.js",
"../../word/Editor/Table/TableRecalculate.js", "../../word/Editor/Table/TableRecalculate.js",
"../../word/Editor/Table/TableDraw.js", "../../word/Editor/Table/TableDraw.js",
"../../word/Editor/Table/TableRow.js", "../../word/Editor/Table/TableRow.js",
"../../word/Editor/Table/TableCell.js", "../../word/Editor/Table/TableCell.js",
"../../word/Editor/Serialize2.js", "../../word/Editor/Serialize2.js",
"../../word/Editor/Search.js", "../../word/Editor/Search.js",
"../../word/Editor/FontClassification.js", "../../word/Editor/FontClassification.js",
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
"../../word/Drawing/HatchPattern.js", "../../word/Drawing/HatchPattern.js",
"../../word/Drawing/ShapeDrawer.js", "../../word/Drawing/ShapeDrawer.js",
"../../word/Drawing/Metafile.js", "../../word/Drawing/Metafile.js",
"../../common/CollaborativeEditingBase.js", "../../common/CollaborativeEditingBase.js",
"../../word/Drawing/DrawingDocument.js", "../../word/Drawing/DrawingDocument.js",
"../../word/Drawing/GraphicsEvents.js", "../../word/Drawing/GraphicsEvents.js",
"../../common/Scrolls/iscroll.js", "../../common/Scrolls/iscroll.js",
...@@ -121,9 +121,9 @@ ...@@ -121,9 +121,9 @@
"../../word/apiDefines.js", "../../word/apiDefines.js",
"../../common/apiBase.js", "../../common/apiBase.js",
"../../word/api.js", "../../word/api.js",
"../../common/Private/license.js", "../../common/Private/license.js",
"../../common/Private/versionHistory.js", "../../common/Private/versionHistory.js",
"../../word/Private/comments.js", "../../word/Private/comments.js",
"../../word/Private/StyleManager.js", "../../word/Private/StyleManager.js",
"../../word/Private/MailMerge.js", "../../word/Private/MailMerge.js",
"../../word/Private/TrackRevisions.js", "../../word/Private/TrackRevisions.js",
...@@ -155,13 +155,13 @@ ...@@ -155,13 +155,13 @@
"dst": "../../word/sdk-all.js", "dst": "../../word/sdk-all.js",
"externs": [ "externs": [
"../../common/Build/Externs.js", "../../common/Build/Externs.js",
"../../common/3rdparty/jquery/jquery.min.js", "../../../web-apps/vendor/jquery/jquery.min.js",
"../../common/3rdparty/Underscore/underscore-min.js", "../../../web-apps/vendor/underscore/underscore-min.js",
"../../common/3rdparty/Sockjs/sockjs.min.js", "../../../web-apps/vendor/sockjs/sockjs.min.js",
"../../common/3rdparty/XRegExp/xregexp-all-min.js", "../../../web-apps/vendor/xregexp/xregexp-all-min.js",
"../../common/3rdparty/jszip/jszip.min.js", "../../../web-apps/vendor/jszip/jszip.min.js",
"../../common/3rdparty/jszip-utils/jszip-utils.min.js", "../../../web-apps/vendor/jszip-utils/jszip-utils.min.js",
"../../common/3rdparty/jsrsasign/jsrsasign-latest-all-min.js" "../../../web-apps/vendor/jsrsasign/jsrsasign-latest-all-min.js"
], ],
"map": "sdk-all.js.map", "map": "sdk-all.js.map",
"log": "../../word/Build/Log" "log": "../../word/Build/Log"
...@@ -237,4 +237,4 @@ ...@@ -237,4 +237,4 @@
"compile_sdk" "compile_sdk"
] ]
} }
} }
\ 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