Browse Source

Added UMD definition to knockout-sortable

Fixes #488
pull/497/head
Sebastian Rosengren 9 years ago
parent
commit
04553782b5
  1. 2
      Sortable.min.js
  2. 17
      knockout-sortable.js

2
Sortable.min.js vendored

File diff suppressed because one or more lines are too long

17
knockout-sortable.js

@ -1,4 +1,17 @@
(function () {
(function (factory) {
"use strict";
if (typeof define === "function" && define.amd) {
// AMD anonymous module
define(["knockout"], factory);
} else if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
// CommonJS module
var ko = require("knockout");
factory(ko);
} else {
// No module loader (plain <script> tag) - put directly in global namespace
factory(window.ko);
}
})(function (ko) {
"use strict";
var init = function (element, valueAccessor, allBindings, viewModel, bindingContext, sortableOptions) {
@ -158,4 +171,4 @@
}
};
})();
});
Loading…
Cancel
Save