Skip to content

Commit

Permalink
All: Update boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof committed Mar 19, 2015
1 parent 4924f15 commit 01e96e9
Show file tree
Hide file tree
Showing 90 changed files with 1,362 additions and 380 deletions.
14 changes: 11 additions & 3 deletions js/animationComplete.js
Expand Up @@ -2,9 +2,17 @@
//>>description: A handler for css transition & animation end events to ensure callback is executed
//>>label: Animation Complete
//>>group: Core
define( [
"jquery"
], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {
var props = {
Expand Down
19 changes: 14 additions & 5 deletions js/core.js
@@ -1,9 +1,18 @@
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>group: exclude

define([
"./defaults",
"./data",
"./helpers"
], function() {});
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [
"./defaults",
"./data",
"./helpers" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function(){} );
//>>excludeEnd("jqmBuildExclude");
14 changes: 13 additions & 1 deletion js/data.js
Expand Up @@ -5,7 +5,19 @@
//>>css.structure: ../css/structure/jquery.mobile.core.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "./ns" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [
"jquery",
"./ns" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {
var nsNormalizeDict = {},
Expand Down
15 changes: 14 additions & 1 deletion js/defaults.js
Expand Up @@ -5,7 +5,20 @@
//>>css.structure: ../css/structure/jquery.mobile.core.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "./ns", "json!../package.json" ], function( jQuery, ns, pkg ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [
"jquery",
"./ns",
"json!../package.json" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery, ns, pkg ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
Expand Down
14 changes: 13 additions & 1 deletion js/degradeInputs.js
Expand Up @@ -3,7 +3,19 @@
//>>label: Degrade Inputs
//>>group: Utilities

define( [ "jquery", "./widgets/page" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [
"jquery",
"./widgets/page" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

Expand Down
23 changes: 16 additions & 7 deletions js/events.js
Expand Up @@ -3,11 +3,20 @@
//>>label: Events
//>>group: Events

define( [
"jquery",
"./events/navigate",
"./events/touch",
"./events/scroll",
"./events/orientationchange" ], function() {
});
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [
"jquery",
"./events/navigate",
"./events/touch",
"./events/scroll",
"./events/orientationchange" ], factory );
} else {

// Browser globals
factory( jQuery );
}
} )( function() {} );
//>>excludeEnd("jqmBuildExclude");
18 changes: 14 additions & 4 deletions js/events/navigate.js
Expand Up @@ -4,10 +4,20 @@
//>>group: Events

// TODO break out pushstate support test so we don't depend on the whole thing
define([
"jquery",
"./../ns",
"./../support" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [
"jquery",
"./../ns",
"./../support" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");

(function( $, undefined ) {
Expand Down
15 changes: 14 additions & 1 deletion js/events/orientationchange.js
Expand Up @@ -3,7 +3,20 @@
//>>label: Orientation Change
//>>group: Events

define( [ "jquery", "../support/orientation", "./throttledresize" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [
"jquery",
"../support/orientation",
"./throttledresize" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");

(function( $, window ) {
Expand Down
12 changes: 11 additions & 1 deletion js/events/scroll.js
Expand Up @@ -3,7 +3,17 @@
//>>label: Scroll
//>>group: Events

define( [ "jquery" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");

(function( $, window, undefined ) {
Expand Down
12 changes: 11 additions & 1 deletion js/events/throttledresize.js
Expand Up @@ -3,7 +3,17 @@
//>>label: Throttled Resize
//>>group: Events

define( [ "jquery" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");

// throttled resize event
Expand Down
15 changes: 14 additions & 1 deletion js/events/touch.js
Expand Up @@ -3,7 +3,20 @@
//>>label: Touch
//>>group: Events

define( [ "jquery", "../vmouse", "../support/touch" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [
"jquery",
"../vmouse",
"../support/touch" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");

(function( $, window, undefined ) {
Expand Down
12 changes: 11 additions & 1 deletion js/fieldContain.js
Expand Up @@ -5,7 +5,17 @@
//>>css.structure: ../css/structure/jquery.mobile.forms.fieldcontain.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

Expand Down
12 changes: 11 additions & 1 deletion js/grid.js
Expand Up @@ -5,7 +5,17 @@
//>>css.structure:../css/structure/jquery.mobile.grid.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

Expand Down
15 changes: 14 additions & 1 deletion js/helpers.js
Expand Up @@ -5,7 +5,20 @@
//>>css.structure: ../css/structure/jquery.mobile.core.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "./ns", "jquery-ui/core" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [
"jquery",
"./ns",
"jquery-ui/core" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {

Expand Down
4 changes: 0 additions & 4 deletions js/index.php
Expand Up @@ -2,10 +2,6 @@
$type = 'text/javascript';
$files = array(
'../LICENSE-INFO.txt',
// note that define is only included here as a means
// to revert to the pre async include, and should not be
// used in other build methods
'jquery.mobile.define.js',
'ns.js',
'../external/jquery-ui/widget.js',
'widget.js',
Expand Down
36 changes: 23 additions & 13 deletions js/init.js
Expand Up @@ -3,19 +3,29 @@
//>>label: Init
//>>group: Core

define([
"jquery",
"jquery-ui/core",
"./defaults",
"./helpers",
"./data",
"./support",
"./events/navigate",
"./navigation/path",
"./navigation/method",
"./navigation",
"./widgets/loader",
"./vmouse" ], function( jQuery ) {
( function( factory ) {
if ( typeof define === "function" && define.amd ) {

// AMD. Register as an anonymous module.
define( [
"jquery",
"jquery-ui/core",
"./defaults",
"./helpers",
"./data",
"./support",
"./events/navigate",
"./navigation/path",
"./navigation/method",
"./navigation",
"./widgets/loader",
"./vmouse" ], factory );
} else {

// Browser globals
factory( jQuery );
}
})( function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {
var $html = $( "html" ),
Expand Down

0 comments on commit 01e96e9

Please sign in to comment.