1- //
2- //
3- // The main DS app. This guy runs the show.
4- //
5- //
1+ /**
2+ * We configure RequireJS options, paths, and shims here.
3+ *
4+ * - baseURL: Path where modules will be loaded from at runtime.
5+ * - paths: Load any Bower components in here.
6+ * - excludeShallow: Any components that should *not* be included
7+ * in the minified production build. They will be loaded in on
8+ * demand via the RequireJS loader.
9+ * - shim: Shim any non-AMD scripts.
10+ *
11+ * @see https://github.com/jrburke/r.js/blob/master/build/example.build.js
12+ */
13+ require . config ( {
14+ baseUrl : "/profiles/dosomething/themes/dosomething/paraneue_dosomething/js/" ,
15+ include : "main" ,
16+ includeRequire : "main" ,
17+ paths : {
18+ "neue" : "../bower_components/neue/js" ,
19+ "mailcheck" : "../bower_components/mailcheck/src/mailcheck" ,
20+ "lodash" : "../bower_components/lodash/dist/lodash" ,
21+ "text" : "../bower_components/requirejs-text/text" ,
22+ "rem-unit-polyfill" : "../bower_components/REM-unit-polyfill/js/rem" ,
23+ "respond" : "../bower_components/respond/dest/respond.min" ,
24+ } ,
25+ excludeShallow : [
26+ "respond" ,
27+ "rem-unit-polyfill"
28+ ] ,
29+ shim : {
30+ "mailcheck" : { exports : "Kicksend.mailcheck" }
31+ }
32+ } ) ;
33+
634
35+ /**
36+ * This is where we load and initialize components of our app.
37+ */
738define ( "main" , function ( require ) {
839 "use strict" ;
940
1041 // let's get going
1142 var $ = window . jQuery ;
1243 var Finder = require ( "finder/Finder" ) ;
44+ var Features = require ( "utils/features" ) ;
45+
1346
14- require ( "neue/main" ) ;
1547
1648 // Load polyfills
17- require ( "neue/vendor/polyfills/respond" ) ;
18- require ( "neue/vendor/polyfills/rem" ) ;
49+ if ( ! Features . mediaQueries ) {
50+ require ( "respond" ) ;
51+ }
52+
53+ if ( ! Features . remUnits ) {
54+ require ( "rem-unit-polyfill" ) ;
55+ }
1956
2057 // Initialize modules on load
58+ require ( "neue/main" ) ;
2159 require ( "campaign/sources" ) ;
2260 require ( "campaign/tips" ) ;
2361 require ( "campaign/ImageUploader" ) ;
@@ -34,6 +72,4 @@ define("main", function(require) {
3472 ) ;
3573 }
3674 } ) ;
37-
38-
3975} ) ;
0 commit comments