Permalink
Browse files

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

Ref #9647
  • Loading branch information...
1 parent cd6c751 commit 3d71fb83fe02a307823594f5905be9848cfa5506 @arschmitz arschmitz committed Jul 15, 2015
View
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
+ "./version",
"./widget"
], factory );
} else {
View
@@ -25,6 +25,7 @@
"./core",
"./widget",
"./position",
+ "./version",
"./menu"
], factory );
} else {
View
@@ -23,6 +23,7 @@
define([
"jquery",
"./core",
+ "./version",
"./widget"
], factory );
} else {
View
@@ -18,19 +18,17 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [ "jquery" ], factory );
+ define( [
+ "jquery",
+ "./version" ], factory );
} else {
// Browser globals
factory( jQuery );
}
}( function( $ ) {
-// $.ui might exist from components with no dependencies, e.g., $.ui.position
-$.ui = $.ui || {};
-
$.extend( $.ui, {
- version: "@VERSION",
keyCode: {
BACKSPACE: 8,
View
@@ -22,7 +22,8 @@
// AMD. Register as an anonymous module.
define([
"jquery",
- "./core"
+ "./core",
+ "./version"
], factory );
} else {
View
@@ -28,7 +28,8 @@
"./draggable",
"./mouse",
"./position",
- "./resizable"
+ "./resizable",
+ "./version"
], factory );
} else {
View
@@ -21,6 +21,7 @@
define([
"jquery",
"./core",
+ "./version",
"./mouse",
"./widget"
], factory );
View
@@ -19,7 +19,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
- "./core",
+ "./version",
"./widget",
"./mouse",
"./draggable"
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect",
"./effect-scale"
], factory );
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect",
"./effect-size"
], factory );
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
+ "./version",
"./effect"
], factory );
} else {
View
@@ -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
@@ -4,7 +4,8 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
- "ui/core"
+ "ui/core",
+ "./version"
], factory );
} else {
View
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
+ "./version",
"./widget",
"./position"
], factory );
View
@@ -18,6 +18,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
+ "./version",
"./widget"
], factory );
} else {
View
@@ -19,17 +19,14 @@
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
- define( [ "jquery" ], factory );
+ define( [ "jquery", "./version" ], factory );
} else {
// Browser globals
factory( jQuery );
}
}( function( $ ) {
( function() {
-
-$.ui = $.ui || {};
-
var cachedScrollbarWidth, supportsOffsetFractions,
max = Math.max,
abs = Math.abs,
View
@@ -22,7 +22,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
- "./core",
+ "./version",
"./widget"
], factory );
} else {
View
@@ -23,6 +23,7 @@
define([
"jquery",
"./core",
+ "./version",
"./mouse",
"./widget"
], factory );
View
@@ -20,7 +20,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
- "./core",
+ "./version",
"./mouse",
"./widget"
], factory );
View
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
+ "./version",
"./widget",
"./position",
"./menu"
View
@@ -24,6 +24,7 @@
"jquery",
"./core",
"./mouse",
+ "./version",
"./widget"
], factory );
} else {
View
@@ -22,6 +22,7 @@
"jquery",
"./core",
"./mouse",
+ "./version",
"./widget"
], factory );
} else {
View
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
+ "./version",
"./widget",
"./button"
], factory );
View
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
+ "./version",
"./widget"
], factory );
} else {
View
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
+ "./version",
"./widget",
"./position"
], factory );
View
@@ -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
@@ -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

1 comment on commit 3d71fb8

yamass commented on 3d71fb8 Jul 11, 2016

This commit made my code break. I rely on the following line in position.js:

$.ui = $.ui || {};

I did not have any other dependency than position.js till now. Now, I need add version.js as another dependency. However, I liked being able to use only a single js file...

Please sign in to comment.