Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding require.js for optimization

  • Loading branch information...
commit b21fe22645c490b37b170712971ecbd702935573 1 parent c0f4845
@tonydevincenzi tonydevincenzi authored
View
81 minify.js
@@ -1,81 +0,0 @@
-var compressor = require('node-minify');
-
-
-new compressor.minify({
- type: 'yui-js',
- fileIn: [
-
- 'public/libs/jquery.1.7.1.min.js',
- 'public/libs/jquery.miniColors.min.js',
- 'public/libs/jquery-ui.min.js',
- 'public/libs/jquery.ui.touch-punch.min.js',
- 'public/libs/jquery.color.js',
- 'public/libs/jquery.glowing.js',
- 'public/libs/json2.js',
- 'public/libs/color_gradient.js',
- 'public/libs/proj4js-compressed.js',
- 'public/libs/date.js',
- 'public/libs/d3.v2.min.js',
- 'public/libs/rickshaw.min.js',
- 'public/libs/underscore.js',
- 'public/libs/backbone.js',
- 'public/libs/utils.js',
- 'public/libs/three/build/Three.js',
- 'public/libs/ShaderExtras.js',
- 'public/libs/postprocessing/EffectComposer.js',
- 'public/libs/postprocessing/MaskPass.js',
- 'public/libs/postprocessing/RenderPass.js',
- 'public/libs/postprocessing/ShaderPass.js',
- 'public/libs/postprocessing/BloomPass.js',
- 'public/libs/map-gl-libs/THREEx.point-widgets.js',
- 'public/libs/threex/THREEx.WindowResize.js',
- 'public/libs/Tween.js',
- 'public/libs/globe.js',
- 'public/libs/stats.js',
- 'public/libs/gradient-editor/gradient-editor.js',
- 'public/libs/colorpicker/js/colorpicker.js',
- 'public/libs/OpenLayers.js',
- 'public/libs/OpenLayers-extended.js',
- 'public/libs/bootstrap/bootstrap-transition.js',
- 'public/libs/bootstrap/bootstrap-alert.js',
- 'public/libs/bootstrap/bootstrap-modal.js',
- 'public/libs/bootstrap/bootstrap-dropdown.js',
- 'public/libs/bootstrap/bootstrap-tab.js',
- 'public/libs/bootstrap/bootstrap-tooltip.js',
- 'public/libs/bootstrap/bootstrap-popover.js',
- 'public/libs/bootstrap/bootstrap-button.js',
- 'public/libs/bootstrap/bootstrap-collapse.js',
- 'public/libs/infobox.js',
- 'public/app.js',
- 'public/config.js',
- 'public/utils.js',
- 'public/models/point.js',
- 'public/collections/point-collection.js',
- 'public/models/tweet.js',
- 'public/collections/tweet-collection.js',
- 'public/models/comment.js',
- 'public/collections/comment-collection.js',
- 'public/views/map-view-base.js',
- 'public/views/homepage-view.js',
- 'public/views/setup-view.js',
- 'public/views/map-ol-view.js',
- 'public/views/map-gl-view.js',
- 'public/views/header-view.js',
- 'public/views/data-view-base.js',
- 'public/views/data-inspector-view.js',
- 'public/views/data-legend-view.js',
- 'public/views/sidebar-view.js',
- 'public/views/modal-view.js',
- 'public/views/add-data-view.js',
- 'public/views/edit-data-view.js',
- 'public/views/chat-view.js',
- 'public/views/data-library-view.js',
- 'public/views/graph-view.js',
- 'public/views/data-info-view.js'
- ],
-
- fileOut: 'public/miniapp.js',
- callback: function(err){
- console.log(err);
- }
-});
View
100 public/base.html
@@ -5,61 +5,61 @@
<title>GeoSense</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<% if (mapSlugByHost != '') { %><script type="text/javascript">window.MAP_SLUG = '<%= mapSlugByHost %>';</script><% } %>
- <script src="/libs/jquery.1.7.1.min.js"></script>
- <script src="/libs/jquery.miniColors.min.js"></script>
- <script src="/libs/jquery-ui.min.js"></script>
- <script src="/libs/jquery.ui.touch-punch.min.js"></script>
- <script src="/libs/jquery.color.js"></script>
- <script src="/libs/jquery.glowing.js"></script>
- <script src="/libs/json2.js"></script>
- <script src="/libs/color_gradient.js"></script>
- <script src="/libs/proj4js-compressed.js"></script>
-
- <!--<script src="/libs/now.js"></script>-->
- <script src="/libs/date.js"></script>
-
- <script src="/libs/d3.v2.min.js"></script>
- <script src="/libs/rickshaw.min.js"></script>
-
- <script src="/libs/underscore.js"></script>
- <script src="/libs/backbone.js"></script>
- <script src="/libs/utils.js"></script>
-
- <script src="/libs/three/build/Three.js"></script>
- <script src="/libs/ShaderExtras.js"></script>
-
- <script src="/libs/postprocessing/EffectComposer.js"></script>
- <script src="/libs/postprocessing/MaskPass.js"></script>
- <script src="/libs/postprocessing/RenderPass.js"></script>
- <script src="/libs/postprocessing/ShaderPass.js"></script>
- <script src="/libs/postprocessing/BloomPass.js"></script>
-
- <script src="/libs/map-gl-libs/THREEx.point-widgets.js"></script>
- <script src="/libs/threex/THREEx.WindowResize.js"></script>
- <script src="/libs/Tween.js"></script>
- <script src="/libs/globe.js"></script>
- <!--<script src="/libs/oblessd-client.js"></script>-->
- <script src="/libs/stats.js"></script>
-
- <script src="/libs/gradient-editor/gradient-editor.js"></script>
- <script src="/libs/colorpicker/js/colorpicker.js"></script>
-
- <script type="text/javascript" src="http://www.openlayers.org/dev/OpenLayers.js"></script>
- <script src="/libs/cloudmade.js" type="text/javascript"></script>
+ <!-- For production build, remove following script tags -->
+
+ <script src="/libs/jquery.1.7.1.min.js"></script>
+ <script src="/libs/jquery.miniColors.min.js"></script>
+ <script src="/libs/jquery-ui.min.js"></script>
+ <script src="/libs/jquery.ui.touch-punch.min.js"></script>
+ <script src="/libs/jquery.color.js"></script>
+ <script src="/libs/jquery.glowing.js"></script>
+ <script src="/libs/json2.js"></script>
+ <script src="/libs/color_gradient.js"></script>
+ <script src="/libs/proj4js-compressed.js"></script>
+
+ <script src="/libs/now.js"></script>
+ <script src="/libs/date.js"></script>
+
+ <script src="/libs/d3.v2.min.js"></script>
+ <script src="/libs/rickshaw.min.js"></script>
+
+ <script src="/libs/underscore.js"></script>
+ <script src="/libs/backbone.js"></script>
+ <script src="/libs/utils.js"></script>
+
+ <script src="/libs/three/build/Three.js"></script>
+ <script src="/libs/ShaderExtras.js"></script>
+
+ <script src="/libs/postprocessing/EffectComposer.js"></script>
+ <script src="/libs/postprocessing/MaskPass.js"></script>
+ <script src="/libs/postprocessing/RenderPass.js"></script>
+ <script src="/libs/postprocessing/ShaderPass.js"></script>
+ <script src="/libs/postprocessing/BloomPass.js"></script>
+
+ <script src="/libs/map-gl-libs/THREEx.point-widgets.js"></script>
+ <script src="/libs/threex/THREEx.WindowResize.js"></script>
+ <script src="/libs/Tween.js"></script>
+ <script src="/libs/globe.js"></script>
+ <script src="/libs/oblessd-client.js"></script>
+ <script src="/libs/stats.js"></script>
+
+ <script src="/libs/gradient-editor/gradient-editor.js"></script>
+ <script src="/libs/colorpicker/js/colorpicker.js"></script>
+ <script src="/libs/cloudmade.js" type="text/javascript"></script>
+
+ <script src="/libs/OpenLayers/Control/ScaleLine.js"></script>
+
+ <script src="/libs/bootstrap/js/bootstrap.min.js"></script>
+
+ <!-- scripts NOT to be REMOVED -->
+
+ <script type="text/javascript" src="http://www.openlayers.org/dev/OpenLayers.js"></script>
<script src="http://maps.stamen.com/js/tile.stamen.js?v1.1.2"></script>
+ <script data-main="/libs/main" src="/libs/require-jquery.js"></script>
- <script src="/libs/OpenLayers/Control/ScaleLine.js"></script>
-
- <script src="/libs/bootstrap/js/bootstrap.min.js"></script>
-
- <!-- scripts NOT to be minified-->
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
-<!-- <script type="text/javascript" src="http://www.google.com/jsapi?autoload=%7Bmodules%3A%5B%7Bname%3A%22maps%22%2Cversion%3A3%2Cother_params%3A%22sensor%3Dfalse%22%7D%2C%7Bname%3A%22earth%22%2Cversion%3A1%7D%5D%7D"></script>-->
-
-
-
<script type="text/javascript" src="https://use.typekit.com/fkf6mtk.js"></script>
<script >try{Typekit.load();}catch(e){}</script>
View
20 public/libs/app.build.js
@@ -0,0 +1,20 @@
+({
+ appDir: "../",
+ baseUrl: "libs/",
+ dir: "../../public-optimized",
+ //Comment out the optimize line if you want
+ //the code minified by UglifyJS
+ //optimize: "none",
+
+ paths: {
+ "jquery": "empty:",
+ },
+
+ modules: [
+ //Optimize the application files. jQuery is not
+ //included since it is already in require-jquery.js
+ {
+ name: "main"
+ }
+ ]
+})
View
39 public/libs/main.js
@@ -0,0 +1,39 @@
+require([ "jquery",
+ "jquery.1.7.1.min",
+ "jquery.miniColors.min",
+ "jquery-ui.min",
+ "jquery.ui.touch-punch.min",
+ "jquery.color",
+ "jquery.glowing",
+ "json2",
+ "color_gradient",
+ "proj4js-compressed",
+ "now",
+ "date",
+ "d3.v2.min",
+ "rickshaw.min",
+ "Tween",
+ "globe",
+ "oblessd-client",
+ "stats",
+ "cloudmade",
+ "three/build/Three",
+ "ShaderExtras",
+ "postprocessing/EffectComposer",
+ "postprocessing/MaskPass",
+ "postprocessing/RenderPass",
+ "postprocessing/ShaderPass",
+ "postprocessing/BloomPass",
+ "map-gl-libs/THREEx.point-widgets",
+ "threex/THREEx.WindowResize",
+ "gradient-editor/gradient-editor",
+ "colorpicker/js/colorpicker",
+ "OpenLayers/Control/ScaleLine",
+ "bootstrap/js/bootstrap.min",
+ "underscore",
+ "backbone",
+ "utils",
+ ], function($) {
+ //plugins loaded
+});
+
View
11,465 public/libs/require-jquery.js
11,465 additions, 0 deletions not shown
View
23,451 r.js
23,451 additions, 0 deletions not shown
Please sign in to comment.
Something went wrong with that request. Please try again.