Turn on Closure compilers SIMPLE_OPTIMIZATIONS. Slightly change how svgedit namespace is set up in each module

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1931 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2011-01-18 06:46:45 +00:00
parent 8379711c3e
commit 6b8958bd39
10 changed files with 22 additions and 37 deletions

View File

@ -43,10 +43,11 @@ build/$(PACKAGE): $(COMPILED_JS)
# Create the release version of the main HTML file.
build/tools/ship.py --i=editor/svg-editor.html --on=svg_edit_release > build/$(PACKAGE)/svg-editor.html
# codedread: NOTE: Some files are not ready for the Closure compiler: (jquery)
# NOTE: Some files are not ready for the Closure compiler: (jquery)
# NOTE: Our code is *not* ready for ADVANCED_OPTIMIZATIONS
$(COMPILED_JS):
java -jar $(CLOSURE) \
--compilation_level WHITESPACE_ONLY \
--compilation_level SIMPLE_OPTIMIZATIONS \
$(CLOSURE_JS_ARGS) \
--js_output_file $(COMPILED_JS)

View File

@ -10,11 +10,9 @@
// Dependencies:
// 1) jQuery (for $.alert())
(function() {
var svgedit = svgedit || {};
if (!window.svgedit) {
window.svgedit = {};
}
(function() {
if (!svgedit.browser) {
svgedit.browser = {};
@ -25,7 +23,7 @@ var supportsSvg_ = (function() {
})();
svgedit.browser.supportsSvg = function() { return supportsSvg_; }
if(!svgedit.browser.supportsSvg()) {
window.location = "browser-not-supported.html";
window.location = "browser-not-supported.html";
}
else{

View File

@ -11,10 +11,9 @@
// 2) browser.js
// 3) svgutils.js
var svgedit = svgedit || {};
(function() {
if (!window.svgedit) {
window.svgedit = {};
}
if (!svgedit.draw) {
svgedit.draw = {};

View File

@ -11,11 +11,9 @@
// 2) svgtransformlist.js
// 3) svgutils.js
(function() {
var svgedit = svgedit || {};
if (!window.svgedit) {
window.svgedit = {};
}
(function() {
if (!svgedit.history) {
svgedit.history = {};

View File

@ -10,11 +10,9 @@
// Dependencies:
// None.
(function() {
var svgedit = svgedit || {};
if (!window.svgedit) {
window.svgedit = {};
}
(function() {
if (!svgedit.math) {
svgedit.math = {};

View File

@ -11,11 +11,9 @@
// 1) browser.js
// 2) svgutils.js
(function() {
var svgedit = svgedit || {};
if (!window.svgedit) {
window.svgedit = {};
}
(function() {
if (!svgedit.sanitize) {
svgedit.sanitize = {};

View File

@ -13,11 +13,9 @@
// 3) math.js
// 4) svgutils.js
(function() {
var svgedit = svgedit || {};
if (!window.svgedit) {
window.svgedit = {};
}
(function() {
if (!svgedit.select) {
svgedit.select = {};

View File

@ -10,11 +10,10 @@
// Dependencies:
// 1) browser.js
var svgedit = svgedit || {};
(function() {
if (!window.svgedit) {
window.svgedit = {};
}
if (!svgedit.transformlist) {
svgedit.transformlist = {};
}

View File

@ -12,11 +12,9 @@
// 2) browser.js: only for getBBox()
// 3) svgtransformlist.js: only for getRotationAngle()
(function() {
var svgedit = svgedit || {};
if (!window.svgedit) {
window.svgedit = {};
}
(function() {
if (!svgedit.utilities) {
svgedit.utilities = {};

View File

@ -10,11 +10,9 @@
// Dependencies:
// 1) jQuery
(function() {
var svgedit = svgedit || {};
if (!window.svgedit) {
window.svgedit = {};
}
(function() {
if (!svgedit.units) {
svgedit.units = {};