Skip to content

Commit 41f2c3f

Browse files
author
Tomas Kirda
committed
Support Browserify. Closes #189
1 parent 6f46c46 commit 41f2c3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/jquery.autocomplete.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
*/
99

1010
/*jslint browser: true, white: true, plusplus: true */
11-
/*global define, window, document, jQuery */
11+
/*global define, window, document, jQuery, exports */
1212

1313
// Expose plugin as an AMD module if AMD loader is present:
1414
(function (factory) {
1515
'use strict';
1616
if (typeof define === 'function' && define.amd) {
1717
// AMD. Register as an anonymous module.
1818
define(['jquery'], factory);
19+
} else if (typeof exports === 'object' && typeof require === 'function') {
20+
// Browserify
21+
factory(require('jquery'));
1922
} else {
2023
// Browser globals
2124
factory(jQuery);

0 commit comments

Comments
 (0)