8000 Remove global export from UMD template · sumit-jaiswal/restangular@87a371b · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit 87a371b

Browse files
committed
Remove global export from UMD template
1 parent 4e6c7cf commit 87a371b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/restangular.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
// https://github.com/umdjs/umd/blob/master/templates/returnExports.js
12
(function (root, factory) {
23
if (typeof define === 'function' && define.amd) {
34
define(['angular', 'lodash'], factory);
45
} else if (typeof module === 'object' && module.exports) {
56
module.exports = factory(require('angular'), require('lodash'));
67
} else {
7-
root.returnExports = factory(root._, root.angular);
8+
// No global export, Restangular will register itself as Angular.js module
9+
factory(root._, root.angular);
810
}
911
}(this, function (_, angular) {
1012

0 commit comments

Comments
 (0)
0