From dcebcc6b1b5b03f7fd37864ded04fabdba0a0b57 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 4 Jan 2018 22:27:35 +0100 Subject: Initial draft. --- bin/build.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 bin/build.js (limited to 'bin/build.js') diff --git a/bin/build.js b/bin/build.js new file mode 100644 index 0000000..3b750f5 --- /dev/null +++ b/bin/build.js @@ -0,0 +1,41 @@ +{ + 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', + 'app/mapfactory', + 'app/places', + 'app/position' + ] + }, + + //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: '../world-staff', + include: [ + 'json!data/staff.json' + ], + exclude: ['../slippymap'] + } + + ], + optimize: "uglify2", + optimizeCss: "standard.keepLines", + removeCombined: true, +} -- cgit v1.2.3