We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 23bc3b7 + 555adc3 commit 3b9b8c9Copy full SHA for 3b9b8c9
ng-sortable.js
@@ -5,12 +5,17 @@
5
(function (factory) {
6
'use strict';
7
8
- if (window.angular && window.Sortable) {
9
- factory(angular, Sortable);
10
- }
11
- else if (typeof define === 'function' && define.amd) {
+ if (typeof define === 'function' && define.amd) {
12
define(['angular', './Sortable'], factory);
13
}
+ else if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {
+ require('angular');
+ factory(angular, require('./Sortable'));
14
+ module.exports = 'ng-sortable';
15
+ }
16
+ else if (window.angular && window.Sortable) {
17
+ factory(angular, Sortable);
18
19
})(function (angular, Sortable) {
20
21
0 commit comments