Get SIMPLE_OPTIMIZATIONS working
authorRobert Sesek <rsesek@bluestatic.org>
Wed, 28 Dec 2011 22:28:27 +0000 (17:28 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Wed, 28 Dec 2011 22:28:27 +0000 (17:28 -0500)
build.py
web_frontend/utils.js

index 240ae0c267254b39a6dd8b8674b5d8317d4a9d16..ceacb9c76cfbea5bad599942f42796c06685ac59 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -121,7 +121,7 @@ def _CompileFrontEnd(options):
     fe_sources = map(lambda f: '--js=' + os.path.join(FE_PATH, f), SOURCES_FE)
     args = [ 'java', '-jar', CLOSURE_COMPILER ]
     args.extend(fe_sources)
-    args.extend(['--js_output_file', outfile])
+    args.extend(['--js_output_file', outfile, '--compilation_level', 'SIMPLE_OPTIMIZATIONS'])
     print '  ' + ' '.join(args)
     handle = subprocess.Popen(args, stdout = sys.stdout, stderr = sys.stderr)
     handle.wait()
index aacd07012f8e47b788b7658904dbb5253753f5ff..991f339f6f226c9f57cd7d23de42e2ffa5fd1a18 100644 (file)
@@ -1,28 +1,30 @@
 //
 // Armadillo File Manager
 // Copyright (c) 2011, Robert Sesek <http://www.bluestatic.org>
-// 
+//
 // This program is free software: you can redistribute it and/or modify it under
 // the terms of the GNU General Public License as published by the Free Software
 // Foundation, either version 3 of the License, or any later version.
 //
 
-/**
- * Defines a namespace.
- * @param {string} ns
- */
-jQuery.namespace = function(ns) {
-  var parent = window;
-  this.each(ns.split('.'), function (i, space) {
-    parent[space] = parent[space] || {};
-    parent = parent[space];
-  });
-}
+$.extend({
+  /**
+   * Defines a namespace.
+   * @param {string} ns
+   */
+  namespace: function(ns) {
+    var parent = window;
+    this.each(ns.split('.'), function (i, space) {
+      parent[space] = parent[space] || {};
+      parent = parent[space];
+    });
+  },
 
-/**
- * Shortcut for creating a DOM element.
- * @param {string} elm
- */
-jQuery.createDom = function(elm) {
-  return this(document.createElement(elm));
-}
+  /**
+   * Shortcut for creating a DOM element.
+   * @param {string} elm
+   */
+  createDom: function(elm) {
+    return this(document.createElement(elm));
+  }
+});