You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ry...@apache.org on 2013/05/12 18:00:53 UTC

git commit: updated refs/heads/fauxton-simpler-build to c090e9e

Updated Branches:
  refs/heads/fauxton-simpler-build 4615a788d -> c090e9ef7


Support loading addons.\n\n Addons are enabled in the addons.js file. External addons are loaded in the sibling directory to fauxton


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c090e9ef
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c090e9ef
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c090e9ef

Branch: refs/heads/fauxton-simpler-build
Commit: c090e9ef722643b23f55fd9180f9fba926a8b7a8
Parents: 4615a78
Author: Ryan Ramage <ry...@gmail.com>
Authored: Sun May 12 09:59:51 2013 -0600
Committer: Ryan Ramage <ry...@gmail.com>
Committed: Sun May 12 09:59:51 2013 -0600

----------------------------------------------------------------------
 src/fauxton/addons.js                    |   11 ++++++++++
 src/fauxton/js/load_addons.js            |   27 -------------------------
 src/fauxton/js/load_addons.js.underscore |   27 -------------------------
 src/fauxton/js/router.js                 |    2 +-
 src/fauxton/rebuild                      |    8 ++++++-
 5 files changed, 19 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c090e9ef/src/fauxton/addons.js
----------------------------------------------------------------------
diff --git a/src/fauxton/addons.js b/src/fauxton/addons.js
new file mode 100644
index 0000000..3c6b60d
--- /dev/null
+++ b/src/fauxton/addons.js
@@ -0,0 +1,11 @@
+define([
+        "js/addons/config/base",
+        "js/addons/logs/base",
+        "js/addons/stats/base",
+        "js/addons/contribute/base"
+        // ,"../fauxton-demo-plugin/base"
+], function() {
+  return {
+    addons: arguments
+  };
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c090e9ef/src/fauxton/js/load_addons.js
----------------------------------------------------------------------
diff --git a/src/fauxton/js/load_addons.js b/src/fauxton/js/load_addons.js
deleted file mode 100644
index 8203c8f..0000000
--- a/src/fauxton/js/load_addons.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-
-/*
- * ::WARNING::
- * THIS IS A GENERATED FILE. DO NOT EDIT.
- */
-define([
-  "js/addons/config/base","js/addons/logs/base","js/addons/stats/base","js/addons/contribute/base"
-],
-function() {
-  var LoadAddons = {
-    addons: arguments
-  };
-
-  return LoadAddons;
-});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c090e9ef/src/fauxton/js/load_addons.js.underscore
----------------------------------------------------------------------
diff --git a/src/fauxton/js/load_addons.js.underscore b/src/fauxton/js/load_addons.js.underscore
deleted file mode 100644
index 9686ad7..0000000
--- a/src/fauxton/js/load_addons.js.underscore
+++ /dev/null
@@ -1,27 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-
-/*
- * ::WARNING::
- * THIS IS A GENERATED FILE. DO NOT EDIT.
- */
-define([
-  <%= '"' + deps.join('","') + '"' %>
-],
-function() {
-  var LoadAddons = {
-    addons: arguments
-  };
-
-  return LoadAddons;
-});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c090e9ef/src/fauxton/js/router.js
----------------------------------------------------------------------
diff --git a/src/fauxton/js/router.js b/src/fauxton/js/router.js
index e5de71c..87d6779 100644
--- a/src/fauxton/js/router.js
+++ b/src/fauxton/js/router.js
@@ -39,7 +39,7 @@ define([
   // "modules/logs/base",
   // "modules/config/base",
 
-  "js/load_addons"
+  "addons"
 ],
 
 function(req, app, Initialize, FauxtonAPI, Fauxton, Layout, Databases, Documents, Pouch, LoadAddons) {

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c090e9ef/src/fauxton/rebuild
----------------------------------------------------------------------
diff --git a/src/fauxton/rebuild b/src/fauxton/rebuild
index 42219c0..908bd85 100755
--- a/src/fauxton/rebuild
+++ b/src/fauxton/rebuild
@@ -1,7 +1,13 @@
 #!/usr/bin/env bash
 
 if [ -n "$1" ] && [ "$1" == "compile" ]; then
-    jam compile -i js/main  -o jam/require.prod.js;
+
+    ADDONS=""
+    if [ -e addons.js ]; then
+        ADDONS=" -i ./addons.js "
+    fi
+
+    jam compile -i js/main $ADDONS  -o jam/require.prod.js;
 else
     if [ -e "jam/require.prod.js" ]; then
         rm jam/require.prod.js;