Skip to content

Commit 3b9b8c9

Browse files
committed
Merge pull request #564 from Ferdaszewski/dev
Added Browserify support for ng-sortable
2 parents 23bc3b7 + 555adc3 commit 3b9b8c9

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

ng-sortable.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55
(function (factory) {
66
'use strict';
77

8-
if (window.angular && window.Sortable) {
9-
factory(angular, Sortable);
10-
}
11-
else if (typeof define === 'function' && define.amd) {
8+
if (typeof define === 'function' && define.amd) {
129
define(['angular', './Sortable'], factory);
1310
}
11+
else if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {
12+
require('angular');
13+
factory(angular, require('./Sortable'));
14+
module.exports = 'ng-sortable';
15+
}
16+
else if (window.angular && window.Sortable) {
17+
factory(angular, Sortable);
18+
}
1419
})(function (angular, Sortable) {
1520
'use strict';
1621

0 commit comments

Comments
 (0)