2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2025-01-23 07:08:26 +00:00

Support Browserify. Closes #189

This commit is contained in:
Tomas Kirda 2014-08-26 13:54:57 -05:00
parent 6f46c46356
commit 41f2c3fd95

View File

@ -8,7 +8,7 @@
*/
/*jslint browser: true, white: true, plusplus: true */
/*global define, window, document, jQuery */
/*global define, window, document, jQuery, exports */
// Expose plugin as an AMD module if AMD loader is present:
(function (factory) {
@ -16,6 +16,9 @@
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof exports === 'object' && typeof require === 'function') {
// Browserify
factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);