Skip to content

Commit

Permalink
Support CommonJS loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
rniemeyer committed Dec 26, 2014
1 parent 9d1ef69 commit 8a6f8dd
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 111 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "knockout-sortable",
"version": "0.9.2",
"version": "0.9.3",
"main": "./build/knockout-sortable.min.js",
"ignore": [
"examples",
Expand Down
10 changes: 8 additions & 2 deletions build/knockout-sortable.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
// knockout-sortable 0.9.2 | (c) 2014 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
// knockout-sortable 0.9.3 | (c) 2014 Ryan Niemeyer | http://www.opensource.org/licenses/mit-license
;(function(factory) {
if (typeof define === "function" && define.amd) {
// AMD anonymous module
define(["knockout", "jquery", "jquery.ui.sortable"], factory);
} else if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
// CommonJS module
var ko = require("knockout"),
jQuery = require("jquery");
require("jquery.ui.sortable");
factory(ko, jQuery);
} else {
// No module loader (plain <script> tag) - put directly in global namespace
factory(window.ko, jQuery);
factory(window.ko, window.jQuery);
}
})(function(ko, $) {
var ITEMKEY = "ko_sortItem",
Expand Down
4 changes: 2 additions & 2 deletions build/knockout-sortable.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/connectedLists.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script type='text/javascript' src='../ext/jquery-1.9.1.js'></script>
<script type="text/javascript" src="../ext/jquery-ui.js"></script>

<script type='text/javascript' src="../ext/knockout-3.1.0.js"></script>
<script type='text/javascript' src="../ext/knockout-3.2.0.js"></script>
<script type='text/javascript' src="../build/knockout-sortable.min.js"></script>

<style type='text/css'>
Expand Down
2 changes: 1 addition & 1 deletion examples/draggable.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script type='text/javascript' src='../ext/jquery-1.9.1.js'></script>
<script type="text/javascript" src="../ext/jquery-ui.js"></script>

<script type='text/javascript' src="../ext/knockout-3.1.0.js"></script>
<script type='text/javascript' src="../ext/knockout-3.2.0.js"></script>
<script type='text/javascript' src="../build/knockout-sortable.min.js"></script>

<style type='text/css'>
Expand Down
2 changes: 1 addition & 1 deletion examples/seatingChart.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<script type='text/javascript' src='../ext/jquery-1.9.1.js'></script>
<script type="text/javascript" src="../ext/jquery-ui.js"></script>
<script type='text/javascript' src="../ext/knockout-3.1.0.js"></script>
<script type='text/javascript' src="../ext/knockout-3.2.0.js"></script>
<script type='text/javascript' src="../build/knockout-sortable.min.js"></script>
<script type='text/javascript' src="seatingChart.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion examples/singleList.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script type='text/javascript' src='../ext/jquery-1.9.1.js'></script>
<script type="text/javascript" src="../ext/jquery-ui.js"></script>

<script type='text/javascript' src="../ext/knockout-3.1.0.js"></script>
<script type='text/javascript' src="../ext/knockout-3.2.0.js"></script>
<script type='text/javascript' src="../build/knockout-sortable.js"></script>

<style type='text/css'>
Expand Down
Loading

0 comments on commit 8a6f8dd

Please sign in to comment.