Core: Move version and creation of the ui namespace into its own module

Ref #9647
This commit is contained in:
Alexander Schmitz 2015-07-15 18:26:12 -04:00
parent cd6c751b88
commit 3d71fb83fe
39 changed files with 60 additions and 17 deletions

View File

@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget"
], factory );
} else {

View File

@ -25,6 +25,7 @@
"./core",
"./widget",
"./position",
"./version",
"./menu"
], factory );
} else {

View File

@ -23,6 +23,7 @@
define([
"jquery",
"./core",
"./version",
"./widget"
], factory );
} else {

View File

@ -18,7 +18,9 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
define( [
"jquery",
"./version" ], factory );
} else {
// Browser globals
@ -26,11 +28,7 @@
}
}( function( $ ) {
// $.ui might exist from components with no dependencies, e.g., $.ui.position
$.ui = $.ui || {};
$.extend( $.ui, {
version: "@VERSION",
keyCode: {
BACKSPACE: 8,

View File

@ -22,7 +22,8 @@
// AMD. Register as an anonymous module.
define([
"jquery",
"./core"
"./core",
"./version"
], factory );
} else {

View File

@ -28,7 +28,8 @@
"./draggable",
"./mouse",
"./position",
"./resizable"
"./resizable",
"./version"
], factory );
} else {

View File

@ -21,6 +21,7 @@
define([
"jquery",
"./core",
"./version",
"./mouse",
"./widget"
], factory );

View File

@ -19,7 +19,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
"./core",
"./version",
"./widget",
"./mouse",
"./draggable"

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect",
"./effect-scale"
], factory );

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect",
"./effect-size"
], factory );

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {

View File

@ -17,7 +17,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
define( [ "jquery", "./version" ], factory );
} else {
// Browser globals

View File

@ -4,7 +4,8 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"ui/core"
"ui/core",
"./version"
], factory );
} else {

View File

@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget",
"./position"
], factory );

View File

@ -18,6 +18,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
"./version",
"./widget"
], factory );
} else {

View File

@ -19,7 +19,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
define( [ "jquery", "./version" ], factory );
} else {
// Browser globals
@ -27,9 +27,6 @@
}
}( function( $ ) {
( function() {
$.ui = $.ui || {};
var cachedScrollbarWidth, supportsOffsetFractions,
max = Math.max,
abs = Math.abs,

View File

@ -22,7 +22,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./core",
"./version",
"./widget"
], factory );
} else {

View File

@ -23,6 +23,7 @@
define([
"jquery",
"./core",
"./version",
"./mouse",
"./widget"
], factory );

View File

@ -20,7 +20,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
"./core",
"./version",
"./mouse",
"./widget"
], factory );

View File

@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget",
"./position",
"./menu"

View File

@ -24,6 +24,7 @@
"jquery",
"./core",
"./mouse",
"./version",
"./widget"
], factory );
} else {

View File

@ -22,6 +22,7 @@
"jquery",
"./core",
"./mouse",
"./version",
"./widget"
], factory );
} else {

View File

@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget",
"./button"
], factory );

View File

@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget"
], factory );
} else {

View File

@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget",
"./position"
], factory );

17
ui/version.js Normal file
View File

@ -0,0 +1,17 @@
( function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
} else {
// Browser globals
factory( jQuery );
}
} ( function( $ ) {
$.ui = $.ui || {};
return $.ui.version = "@VERSION";
} ) );

View File

@ -17,7 +17,7 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [ "jquery" ], factory );
define( [ "jquery", "./version" ], factory );
} else {
// Browser globals