Skip to content

Commit

Permalink
Convert to AMD
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Apr 1, 2011
1 parent 5fad2d6 commit 7d64771
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
12 changes: 8 additions & 4 deletions Source/Slick.Finder.js
Expand Up @@ -7,7 +7,8 @@ requires: Slick.Parser
...
*/

;(function(){
;(function(define){
define(["./Slick.Parser"], function(Slick){

var local = {},
featuresCache = {},
Expand Down Expand Up @@ -888,7 +889,7 @@ local.attributeGetters = {

// Slick

var Slick = local.Slick = (this.Slick || {});
local.Slick = Slick;

Slick.version = '1.1.5';

Expand Down Expand Up @@ -965,6 +966,9 @@ Slick.uidOf = function(node){
return local.getUIDHTML(node);
};

if (!this.Slick) this.Slick = Slick;
});
})(typeof define != "undefined" ? define: function(factory){
// Slick NS
factory(this.Slick || (this.Slick = {}));
});

}).apply(/*<CommonJS>*/(typeof exports != 'undefined') ? exports : /*</CommonJS>*/this);
19 changes: 9 additions & 10 deletions Source/Slick.Parser.js
Expand Up @@ -6,7 +6,8 @@ provides: Slick.Parser
...
*/

;(function(){
;(function(define){
define(["exports"], function(exports){

var parsed,
separatorIndex,
Expand Down Expand Up @@ -215,16 +216,14 @@ function parser(
return '';
};

// Slick NS

var Slick = (this.Slick || {});

Slick.parse = function(expression){
exports.parse = function(expression){
return parse(expression);
};

Slick.escapeRegExp = escapeRegExp;

if (!this.Slick) this.Slick = Slick;
exports.escapeRegExp = escapeRegExp;

}).apply(/*<CommonJS>*/(typeof exports != 'undefined') ? exports : /*</CommonJS>*/this);
});
})(typeof define != "undefined" ? define: function(factory){
// Slick NS
factory(this.Slick || (this.Slick = {}));
});

0 comments on commit 7d64771

Please sign in to comment.