Skip to content
Permalink
Browse files

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

Ref #9647
  • Loading branch information
arschmitz committed Jul 15, 2015
1 parent cd6c751 commit 3d71fb83fe02a307823594f5905be9848cfa5506
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget"
], factory );
} else {
@@ -25,6 +25,7 @@
"./core",
"./widget",
"./position",
"./version",
"./menu"
], factory );
} else {
@@ -23,6 +23,7 @@
define([
"jquery",
"./core",
"./version",
"./widget"
], factory );
} else {
@@ -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,
@@ -22,7 +22,8 @@
// AMD. Register as an anonymous module.
define([
"jquery",
"./core"
"./core",
"./version"
], factory );
} else {

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

@@ -21,6 +21,7 @@
define([
"jquery",
"./core",
"./version",
"./mouse",
"./widget"
], factory );
@@ -19,7 +19,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
"./core",
"./version",
"./widget",
"./mouse",
"./draggable"
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect",
"./effect-scale"
], factory );
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect",
"./effect-size"
], factory );
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -19,6 +19,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./version",
"./effect"
], factory );
} else {
@@ -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
@@ -4,7 +4,8 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"ui/core"
"ui/core",
"./version"
], factory );
} else {

@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget",
"./position"
], factory );
@@ -18,6 +18,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
"./version",
"./widget"
], factory );
} else {
@@ -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,
@@ -22,7 +22,7 @@
// AMD. Register as an anonymous module.
define( [
"jquery",
"./core",
"./version",
"./widget"
], factory );
} else {
@@ -23,6 +23,7 @@
define([
"jquery",
"./core",
"./version",
"./mouse",
"./widget"
], factory );
@@ -20,7 +20,7 @@
// AMD. Register as an anonymous module.
define([
"jquery",
"./core",
"./version",
"./mouse",
"./widget"
], factory );
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget",
"./position",
"./menu"
@@ -24,6 +24,7 @@
"jquery",
"./core",
"./mouse",
"./version",
"./widget"
], factory );
} else {
@@ -22,6 +22,7 @@
"jquery",
"./core",
"./mouse",
"./version",
"./widget"
], factory );
} else {
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget",
"./button"
], factory );
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget"
], factory );
} else {
@@ -23,6 +23,7 @@
define( [
"jquery",
"./core",
"./version",
"./widget",
"./position"
], factory );
@@ -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";

} ) );
@@ -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

This comment has been minimized.

Copy link

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.
You can’t perform that action at this time.