Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

fix on plugin wrapper in order to work with webpack #199

Merged
merged 3 commits into from
Feb 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions dist/js/bootstrap-colorpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,22 @@
*
*/

(function(factory) {
var global = (typeof window === 'undefined') ? this : window;

if (typeof exports === 'object') {
module.exports = factory(global.jQuery, global);
} else if (typeof define === 'function' && define.amd) {
define(['jquery'], function(jq) {
return factory(jq, global);
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module unless amdModuleId is set
define(["jquery"], function(jq) {
return (factory(jq));
});
} else if (global.jQuery && !global.jQuery.fn.colorpicker) {
factory(global.jQuery, global);
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(require("jquery"));
} else if (jQuery && !jQuery.fn.colorpicker) {
factory(jQuery);
}
}(function(jQuery, window) {
}(this, function($) {
'use strict';

var $ = jQuery;

/**
* Color manipulation helper class
*
Expand Down
Loading