summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/build.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/etc/build.js b/etc/build.js
new file mode 100644
index 0000000..3ecf8d0
--- /dev/null
+++ b/etc/build.js
@@ -0,0 +1,45 @@
+{
+ appDir: '../src',
+ mainConfigFile: '../src/js/slippymap.js',
+ dir: '../build',
+ modules: [
+ //First set up the common build layer.
+ {
+ //module names are relative to baseUrl
+ name: '../slippymap',
+ //List common dependencies here. Only need to list
+ //top level dependencies, "include" will find
+ //nested dependencies.
+ include: [
+ 'leaflet',
+ 'leaflet.extra-markers',
+ 'leaflet.markercluster',
+ 'app/mapfactory',
+ 'app/boundary',
+ 'app/places'
+ ]
+ },
+
+ //Now set up a build layer for each page, but exclude
+ //the common one. "exclude" will exclude
+ //the nested, built dependencies from "slippymap". Any
+ //"exclude" that includes built modules should be
+ //listed before the build layer that wants to exclude it.
+ //"include" the appropriate "app/main*" module since by default
+ //it will not get added to the build since it is loaded by a nested
+ //requirejs in the page*.js files.
+ {
+ name: '../tours',
+ include: [
+ 'json!data/copenhagen.json',
+ 'app/places',
+ 'json!data/tours.json'
+ ],
+ exclude: ['../slippymap']
+ }
+
+ ],
+ optimize: "uglify2",
+ optimizeCss: "standard.keepLines",
+ removeCombined: true,
+}