From 201fb61caef299a9d3f3910ba8a95af86562056f Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 13 Apr 2015 23:28:40 +0200 Subject: [PATCH 1/2] Add package.json --- jquery.blockUI.js | 7 ++++++- package.json | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 package.json diff --git a/jquery.blockUI.js b/jquery.blockUI.js index 90ce5d6..13af1c9 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 + setup(require('jquery')); } else { + // Browser globals setup(jQuery); } diff --git a/package.json b/package.json new file mode 100644 index 0000000..b4728b5 --- /dev/null +++ b/package.json @@ -0,0 +1,39 @@ +{ + "name": "block-ui", + "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": "M. Alsup (http://jquery.malsup.com)", + "bugs": { + "url": "https://github.com/malsup/blockui/issues" + }, + "dependencies": { + "jquery": ">=1.7.x" + }, + "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", + "repository": { + "type": "git", + "url": "https://github.com/malsup/blockui.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + } +} From 5e69be0f59210934ac38742b3ea3ac473c0071f7 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 14 Apr 2015 08:33:52 +0200 Subject: [PATCH 2/2] Update README --- README.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c3f8c8c..4eee878 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# BlockUI - Page or element overlay +# BlockUI - Page or element overlay [![NPM version][npm-image]][npm-url] + +### NOTE: This is a fork from the official version, for publishing on npm. See https://github.com/malsup/blockui/pull/114 ## Getting Started Download either the [production version][min] or the [development version][max] of BlockUI. @@ -8,21 +10,21 @@ Download either the [production version][min] or the [development version][max] In your web page: -
-<!-- include jQuery -->
-<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
-<!-- include BlockUI -->
-<script src="http://path/to/your/copy/of/jquery.blockUI.js"></script>
-<script>
-// invoke blockUI as needed -->
+```html
+
+
+
+
+
+```
 
 ## Documentation, Demos and FAQ
-Everything you need to know can be found here: 
+Everything you need to know can be found here:
 [http://jquery.malsup.com/block/](http://jquery.malsup.com/block/)
 
 
@@ -36,3 +38,6 @@ You may use either license.  The MIT license is recommended for most projects be
 If the GPL suits your project better you are also free to use the plugin under that license.
 
 You do not have to do anything special to choose one license or the other and you don't have to notify anyone which license you are using. You are free to use the BlockUI plugin in commercial projects as long as the copyright header is left intact.
+
+[npm-url]: https://www.npmjs.com/package/block-ui/
+[npm-image]: http://img.shields.io/npm/v/block-ui.svg