From 5a5c3e22637afa01f59a0a311ebd092994ce22b4 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Sun, 29 Mar 2015 03:46:10 +0200 Subject: [PATCH] r.js minify --- .gitignore | 1 + README.md | 8 ++++++++ app.js | 1 - bower.json | 4 +++- build.js | 9 +++++++++ 5 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 build.js diff --git a/.gitignore b/.gitignore index fbe05fc..b68953f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ bower_components/ +app-combined.js diff --git a/README.md b/README.md index d5cc794..2f173f2 100644 --- a/README.md +++ b/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`. diff --git a/app.js b/app.js index 9906995..1d60bea 100644 --- a/app.js +++ b/app.js @@ -1,5 +1,4 @@ require.config({ - urlArgs: "bust=" + (new Date()).getTime(), baseUrl: "lib", paths: { "leaflet": "../bower_components/leaflet/dist/leaflet", diff --git a/bower.json b/bower.json index 0e76d1a..438d931 100644 --- a/bower.json +++ b/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 " diff --git a/build.js b/build.js new file mode 100644 index 0000000..7666ee6 --- /dev/null +++ b/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" +})