mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2025-02-02 20:08:26 +00:00
Support Browserify. Closes #189
This commit is contained in:
parent
6f46c46356
commit
41f2c3fd95
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*jslint browser: true, white: true, plusplus: true */
|
/*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:
|
// Expose plugin as an AMD module if AMD loader is present:
|
||||||
(function (factory) {
|
(function (factory) {
|
||||||
@ -16,6 +16,9 @@
|
|||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
// AMD. Register as an anonymous module.
|
// AMD. Register as an anonymous module.
|
||||||
define(['jquery'], factory);
|
define(['jquery'], factory);
|
||||||
|
} else if (typeof exports === 'object' && typeof require === 'function') {
|
||||||
|
// Browserify
|
||||||
|
factory(require('jquery'));
|
||||||
} else {
|
} else {
|
||||||
// Browser globals
|
// Browser globals
|
||||||
factory(jQuery);
|
factory(jQuery);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user