diff options
Diffstat (limited to 'node_modules/global')
-rw-r--r-- | node_modules/global/.npmignore | 15 | ||||
-rw-r--r-- | node_modules/global/.travis.yml | 4 | ||||
-rw-r--r-- | node_modules/global/LICENSE | 19 | ||||
-rw-r--r-- | node_modules/global/README.md | 30 | ||||
-rw-r--r-- | node_modules/global/console.js | 1 | ||||
-rw-r--r-- | node_modules/global/document.js | 17 | ||||
-rw-r--r-- | node_modules/global/node_modules/process/LICENSE | 22 | ||||
-rw-r--r-- | node_modules/global/node_modules/process/README.md | 15 | ||||
-rw-r--r-- | node_modules/global/node_modules/process/browser.js | 53 | ||||
-rw-r--r-- | node_modules/global/node_modules/process/index.js | 2 | ||||
-rw-r--r-- | node_modules/global/node_modules/process/package.json | 18 | ||||
-rw-r--r-- | node_modules/global/package.json | 63 | ||||
-rw-r--r-- | node_modules/global/process.js | 1 | ||||
-rw-r--r-- | node_modules/global/window.js | 13 |
14 files changed, 273 insertions, 0 deletions
diff --git a/node_modules/global/.npmignore b/node_modules/global/.npmignore new file mode 100644 index 000000000..fd31f5ee6 --- /dev/null +++ b/node_modules/global/.npmignore @@ -0,0 +1,15 @@ +.DS_Store +.monitor +.*.swp +.nodemonignore +releases +*.log +*.err +fleet.json +public/browserify +bin/*.json +.bin +build +compile +.lock-wscript +node_modules diff --git a/node_modules/global/.travis.yml b/node_modules/global/.travis.yml new file mode 100644 index 000000000..ed178f635 --- /dev/null +++ b/node_modules/global/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - 0.9 diff --git a/node_modules/global/LICENSE b/node_modules/global/LICENSE new file mode 100644 index 000000000..822d880b9 --- /dev/null +++ b/node_modules/global/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Colingo. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/global/README.md b/node_modules/global/README.md new file mode 100644 index 000000000..289d305f0 --- /dev/null +++ b/node_modules/global/README.md @@ -0,0 +1,30 @@ +# global + +<!-- [![build status][1]][2] + +[![browser support][3]][4] --> + +Require global variables + +## Example + +```js +var global = require("global") +var document = require("global/document") +var window = require("global/window") +``` + +## Installation + +`npm install global` + +## Contributors + + - Raynos + +## MIT Licenced + + [1]: https://secure.travis-ci.org/Colingo/global.png + [2]: http://travis-ci.org/Colingo/global + [3]: http://ci.testling.com/Colingo/global.png + [4]: http://ci.testling.com/Colingo/global diff --git a/node_modules/global/console.js b/node_modules/global/console.js new file mode 100644 index 000000000..5cb1dfa10 --- /dev/null +++ b/node_modules/global/console.js @@ -0,0 +1 @@ +module.exports = console; diff --git a/node_modules/global/document.js b/node_modules/global/document.js new file mode 100644 index 000000000..7c0f50dc5 --- /dev/null +++ b/node_modules/global/document.js @@ -0,0 +1,17 @@ +var topLevel = typeof global !== 'undefined' ? global : + typeof window !== 'undefined' ? window : {} +var minDoc = require('min-document'); + +var doccy; + +if (typeof document !== 'undefined') { + doccy = document; +} else { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; + + if (!doccy) { + doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; + } +} + +module.exports = doccy; diff --git a/node_modules/global/node_modules/process/LICENSE b/node_modules/global/node_modules/process/LICENSE new file mode 100644 index 000000000..b8c1246cf --- /dev/null +++ b/node_modules/global/node_modules/process/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2013 Roman Shtylman <shtylman@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/global/node_modules/process/README.md b/node_modules/global/node_modules/process/README.md new file mode 100644 index 000000000..b725695bc --- /dev/null +++ b/node_modules/global/node_modules/process/README.md @@ -0,0 +1,15 @@ +# process + +```require('process');``` just like any other module. + +Works in node.js and browsers via the browser.js shim provided with the module. + +## package manager notes + +If you are writing a bundler to package modules for client side use, make sure you use the ```browser``` field hint in package.json. + +See https://gist.github.com/4339901 for details. + +The [browserify](https://github.com/substack/node-browserify) module will properly handle this field when bundling your files. + + diff --git a/node_modules/global/node_modules/process/browser.js b/node_modules/global/node_modules/process/browser.js new file mode 100644 index 000000000..a4ae72538 --- /dev/null +++ b/node_modules/global/node_modules/process/browser.js @@ -0,0 +1,53 @@ +// shim for using process in browser + +var process = module.exports = {}; + +process.nextTick = (function () { + var canSetImmediate = typeof window !== 'undefined' + && window.setImmediate; + var canPost = typeof window !== 'undefined' + && window.postMessage && window.addEventListener + ; + + if (canSetImmediate) { + return function (f) { return window.setImmediate(f) }; + } + + if (canPost) { + var queue = []; + window.addEventListener('message', function (ev) { + var source = ev.source; + if ((source === window || source === null) && ev.data === 'process-tick') { + ev.stopPropagation(); + if (queue.length > 0) { + var fn = queue.shift(); + fn(); + } + } + }, true); + + return function nextTick(fn) { + queue.push(fn); + window.postMessage('process-tick', '*'); + }; + } + + return function nextTick(fn) { + setTimeout(fn, 0); + }; +})(); + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +} + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; diff --git a/node_modules/global/node_modules/process/index.js b/node_modules/global/node_modules/process/index.js new file mode 100644 index 000000000..8d8ed7df4 --- /dev/null +++ b/node_modules/global/node_modules/process/index.js @@ -0,0 +1,2 @@ +// for now just expose the builtin process global from node.js +module.exports = global.process; diff --git a/node_modules/global/node_modules/process/package.json b/node_modules/global/node_modules/process/package.json new file mode 100644 index 000000000..a0eb77447 --- /dev/null +++ b/node_modules/global/node_modules/process/package.json @@ -0,0 +1,18 @@ +{ + "author": "Roman Shtylman <shtylman@gmail.com>", + "name": "process", + "description": "process information for node.js and browsers", + "keywords": [ + "process" + ], + "version": "0.5.2", + "repository": { + "type": "git", + "url": "git://github.com/shtylman/node-process.git" + }, + "browser": "./browser.js", + "main": "./index.js", + "engines": { + "node": ">= 0.6.0" + } +} diff --git a/node_modules/global/package.json b/node_modules/global/package.json new file mode 100644 index 000000000..d79c2f277 --- /dev/null +++ b/node_modules/global/package.json @@ -0,0 +1,63 @@ +{ + "name": "global", + "version": "4.3.2", + "description": "Require global variables", + "keywords": [], + "author": "Raynos <raynos2@gmail.com>", + "repository": "git://github.com/Raynos/global.git", + "main": "window.js", + "homepage": "https://github.com/Raynos/global", + "contributors": [ + { + "name": "Raynos" + } + ], + "bugs": { + "url": "https://github.com/Raynos/global/issues", + "email": "raynos2@gmail.com" + }, + "browser": { + "min-document": false, + "individual": false + }, + "dependencies": { + "min-document": "^2.19.0", + "process": "~0.5.1" + }, + "devDependencies": { + "tape": "^2.12.0" + }, + "license": "MIT", + "scripts": { + "test": "node ./test", + "build": "browserify test/index.js -o test/static/bundle.js", + "testem": "testem" + }, + "testling": { + "files": "test/index.js", + "browsers": { + "ie": [ + "8", + "9", + "10" + ], + "firefox": [ + "16", + "17", + "nightly" + ], + "chrome": [ + "22", + "23", + "canary" + ], + "opera": [ + "12", + "next" + ], + "safari": [ + "5.1" + ] + } + } +} diff --git a/node_modules/global/process.js b/node_modules/global/process.js new file mode 100644 index 000000000..00a8e3770 --- /dev/null +++ b/node_modules/global/process.js @@ -0,0 +1 @@ +module.exports = require('process'); diff --git a/node_modules/global/window.js b/node_modules/global/window.js new file mode 100644 index 000000000..ae6c11c78 --- /dev/null +++ b/node_modules/global/window.js @@ -0,0 +1,13 @@ +var win; + +if (typeof window !== "undefined") { + win = window; +} else if (typeof global !== "undefined") { + win = global; +} else if (typeof self !== "undefined"){ + win = self; +} else { + win = {}; +} + +module.exports = win; |