Browse Source

r.js minify

Nils Schneider 9 years ago
parent
commit
5a5c3e2263
5 changed files with 21 additions and 2 deletions
  1. 1 0
      .gitignore
  2. 8 0
      README.md
  3. 0 1
      app.js
  4. 3 1
      bower.json
  5. 9 0
      build.js

+ 1 - 0
.gitignore

@@ -1 +1,2 @@
 bower_components/
+app-combined.js

+ 8 - 0
README.md

@@ -6,3 +6,11 @@ modules, run
     bower install
 
 in its root directory.
+
+# Building
+
+Just run:
+
+    node bower_components/r.js/dist/r.js -o build.js
+
+This will create `app-combined.js`.

+ 0 - 1
app.js

@@ -1,5 +1,4 @@
 require.config({
-  urlArgs: "bust=" + (new Date()).getTime(),
   baseUrl: "lib",
   paths: {
     "leaflet": "../bower_components/leaflet/dist/leaflet",

+ 3 - 1
bower.json

@@ -18,7 +18,9 @@
     "requirejs": "~2.1.16",
     "tablesort": "https://github.com/tristen/tablesort.git#v3.0.2",
     "roboto-slab-fontface": "*",
-    "es6-shim": "~0.27.1"
+    "es6-shim": "~0.27.1",
+    "almond": "~0.3.1",
+    "r.js": "~2.1.16"
   },
   "authors": [
     "Nils Schneider <nils@nilsschneider.net>"

+ 9 - 0
build.js

@@ -0,0 +1,9 @@
+({
+    baseUrl: "lib",
+    name: "../bower_components/almond/almond",
+    mainConfigFile: "app.js",
+    include: "main",
+    wrap: true,
+    optimize: "uglify",
+    out: "app-combined.js"
+})