Permalink
Browse files

Re-do build script a bit less professionally

  • Loading branch information...
1 parent e7c9871 commit 88a9a12b035ff598784c6e7d1fdcce8b5a2f5d23 @pudo pudo committed Aug 24, 2012
Showing with 32 additions and 28 deletions.
  1. +0 −18 README.txt
  2. +26 −0 build.sh
  3. +3 −0 prod/boot.js
  4. +1 −4 widgets/aggregate_table/main.js
  5. +1 −3 widgets/bubbletree/main.js
  6. +1 −3 widgets/treemap/main.js
View
@@ -1,23 +1,5 @@
# OpenSpending Javascript libraries
-This directory contains a couple of .do files to assist in the management of
-these libraries. These are "redo" scripts -- see [1].
-
-[1]: https://github.com/apenwarr/redo
-
-If you don't want to install "redo", you can simply use the shell program "do"
-in this directory, which comes from [2]:
-
-[2]: https://github.com/apenwarr/redo/blob/master/minimal/do
-
-To regenerate all minified versions of the vendor libraries, simply run:
-
- redo
-
-To regenerate an individual library, say "backbone", run:
-
- redo vendor/backbone.min.js
-
All minification assumes you have `uglifyjs` installed. If you don't, use
npm install uglify-js
View
@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# This will build all scripts for OpenSpending.
+#
+
+echo "Compiling boot script..."
+FN='tmp'
+echo ''>$FN
+cat lib/vendor/yepnope.min.js >>$FN
+cat lib/vendor/base64.js >>$FN
+cat lib/vendor/accounting.min.js >>$FN
+cat lib/vendor/underscore.js >>$FN
+cat lib/vendor/handlebars.js >>$FN
+cat lib/vendor/bootstrap.js >>$FN
+cat lib/boot.js >>$FN
+cat lib/utils/utils.js >>$FN
+cat lib/aggregator.js >>$FN
+uglifyjs -o prod/boot.js $FN
+rm $FN
+
+echo "Compiling browser coffee scripts..."
+coffee -c -o app/browser/ app/browser/openspending.browser.coffee
+coffee -c -o app/data_table/ app/data_table/openspending.data_table.coffee
+coffee -c -o app/faceter/ app/faceter/openspending.faceter.coffee
+
+
View
Oops, something went wrong.
@@ -5,9 +5,6 @@ OpenSpending.AggregateTable = function (elem, context, state) {
var self = this;
var resources = [
- OpenSpending.scriptRoot + "/lib/vendor/underscore.js",
- OpenSpending.scriptRoot + "/lib/aggregator.js",
- OpenSpending.scriptRoot + "/lib/utils/utils.js",
OpenSpending.scriptRoot + "/lib/vendor/datatables/js/jquery.dataTables.js",
OpenSpending.scriptRoot + "/lib/vendor/datatables/css/jquery.dataTables.css",
OpenSpending.scriptRoot + "/app/data_table/openspending.data_table.js",
@@ -176,4 +173,4 @@ OpenSpending.AggregateTable = function (elem, context, state) {
})(jQuery);
-
+
@@ -6,9 +6,7 @@ OpenSpending = "OpenSpending" in window ? OpenSpending : {};
OpenSpending.Bubbletree = function (elem, context, state) {
var self = this;
- var resources = [OpenSpending.scriptRoot + "/lib/vendor/underscore.js",
- OpenSpending.scriptRoot + "/lib/aggregator.js",
- OpenSpending.scriptRoot + "/lib/utils/utils.js",
+ var resources = [
OpenSpending.scriptRoot + "/lib/vendor/jquery.qtip.min.js",
OpenSpending.scriptRoot + "/lib/vendor/jquery.history.js",
OpenSpending.scriptRoot + "/lib/vendor/raphael-min.js",
@@ -5,9 +5,7 @@ OpenSpending = "OpenSpending" in window ? OpenSpending : {};
OpenSpending.Treemap = function (elem, context, state) {
var self = this;
- var resources = [OpenSpending.scriptRoot + "/lib/vendor/underscore.js",
- OpenSpending.scriptRoot + "/lib/aggregator.js",
- OpenSpending.scriptRoot + "/lib/utils/utils.js",
+ var resources = [
OpenSpending.scriptRoot + "/widgets/treemap/js/thejit-2.min.js",
OpenSpending.scriptRoot + "/widgets/treemap/css/treemap.css"
];

0 comments on commit 88a9a12

Please sign in to comment.