diff --git a/jquery.blockUI.js b/jquery.blockUI.js index 90ce5d6..0fc9c7f 100644 --- a/jquery.blockUI.js +++ b/jquery.blockUI.js @@ -611,9 +611,14 @@ /*global define:true */ - if (typeof define === 'function' && define.amd && define.amd.jQuery) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. define(['jquery'], setup); + } else if (typeof exports === 'object') { + // Node/CommonJS + module.exports = setup(require('jquery')); } else { + // Browser globals setup(jQuery); } diff --git a/package.json b/package.json new file mode 100644 index 0000000..c5f0ad5 --- /dev/null +++ b/package.json @@ -0,0 +1,42 @@ +{ + "name": "blockUI", + "description": "Simulate synchronous ajax by blocking - not locking - the UI. This plugin lets you block user interaction with the page or with a specific element on the page. Also great at displaying modal dialogs.", + "version": "2.70.0", + "author": { + "name": "M. Alsup", + "url": "http://jquery.malsup.com" + }, + "bugs": { + "url": "https://github.com/malsup/blockui/issues" + }, + "homepage": "http://jquery.malsup.com/block/", + "keywords": [ + "block", + "dialog", + "ecosystem:jquery", + "jquery-plugin", + "modal", + "overlay" + ], + "license": [ + { + "type": "MIT", + "url": "http://malsup.github.com/mit-license.txt" + }, + { + "type": "GPL", + "url": "http://malsup.github.com/gpl-license-v2.txt" + } + ], + "main": "jquery.blockUI.js", + "peerDependencies": { + "jquery": ">=1.7.x" + }, + "repository": { + "type": "git", + "url": "https://github.com/malsup/blockui.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + } +}