AMD support
Added 2 AMD wrapper; modified clors.js and jqColorPicker.js for easy usage in AMD wrapper. Colors con now also be exported more flexible.pull/42/head
parent
c0847d644d
commit
3bbd372a7b
@ -0,0 +1,13 @@
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define([], function () {
|
||||
return factory(window);
|
||||
});
|
||||
} else {
|
||||
window.Colors = factory(window);
|
||||
}
|
||||
}(
|
||||
// paste colors.js without self invoking part:
|
||||
// beginning: drop 'window.Colors = ('
|
||||
// end: drop ')(window);'
|
||||
));
|
@ -0,0 +1,13 @@
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery', './colors'], function (jQuery, Colors) {
|
||||
return factory(window, jQuery, Colors);
|
||||
});
|
||||
} else {
|
||||
factory(window, jQuery, Colors);
|
||||
}
|
||||
}(
|
||||
// jqColorPicker without self invoking part:
|
||||
// beginning: drop first '('
|
||||
// end: drop ')(window, jQuery, Colors);'
|
||||
));
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue