layaair2-cmd
Version:
layaair version 2 toolkit
274 lines (273 loc) • 11.4 kB
JSON
{
"_args": [
[
{
"raw": "insert-module-globals@^7.0.0",
"scope": null,
"escapedName": "insert-module-globals",
"name": "insert-module-globals",
"rawSpec": "^7.0.0",
"spec": ">=7.0.0 <8.0.0",
"type": "range"
},
"E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\browserify"
]
],
"_from": "insert-module-globals@^7.0.0",
"_hasShrinkwrap": false,
"_id": "insert-module-globals@7.2.0",
"_location": "/insert-module-globals",
"_nodeVersion": "10.4.1",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/insert-module-globals_7.2.0_1529065467183_0.2206976839325525"
},
"_npmUser": {
"name": "goto-bus-stop",
"email": "renee@kooi.me"
},
"_npmVersion": "6.1.0",
"_phantomChildren": {},
"_requested": {
"raw": "insert-module-globals@^7.0.0",
"scope": null,
"escapedName": "insert-module-globals",
"name": "insert-module-globals",
"rawSpec": "^7.0.0",
"spec": ">=7.0.0 <8.0.0",
"type": "range"
},
"_requiredBy": [
"/browserify"
],
"_resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz",
"_shasum": "ec87e5b42728479e327bd5c5c71611ddfb4752ba",
"_shrinkwrap": null,
"_spec": "insert-module-globals@^7.0.0",
"_where": "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\browserify",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"bin": {
"insert-module-globals": "bin/cmd.js"
},
"bugs": {
"url": "https://github.com/browserify/insert-module-globals/issues"
},
"dependencies": {
"JSONStream": "^1.0.3",
"acorn-node": "^1.5.2",
"combine-source-map": "^0.8.0",
"concat-stream": "^1.6.1",
"is-buffer": "^1.1.0",
"path-is-absolute": "^1.0.1",
"process": "~0.11.0",
"through2": "^2.0.0",
"undeclared-identifiers": "^1.1.2",
"xtend": "^4.0.0"
},
"description": "insert implicit module globals into a module-deps stream",
"devDependencies": {
"browser-pack": "^6.0.0",
"buffer": "^4.9.1",
"convert-source-map": "~1.1.0",
"module-deps": "^4.0.2",
"nanobench": "^2.1.1",
"tape": "^4.2.0",
"timers-browserify": "^1.4.2"
},
"directories": {},
"dist": {
"integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==",
"shasum": "ec87e5b42728479e327bd5c5c71611ddfb4752ba",
"tarball": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz",
"fileCount": 44,
"unpackedSize": 32934,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbI6/8CRA9TVsSAnZWagAAuzEP/1M0Kd51ntvyvW0uq9BT\nUcQ947M5wVCcwlluK1fysat0xJFrBR/wRimsUMBrakYIZ0Yp3nlNZvU7MKVs\nR+yegtntm9W18z1x0poYuOXxd8ukUAKQOvkURiOF1g9FBLV/Mj+Rg9VgvFiu\nDjnFB7laWAJ2gWN/EY6Viv/+/XC2b1wl4qqqTEyt2jqpQBDEKwYhpanEuXc0\nihuXb1PU0GubMVNqcmOfDycLtZWzAWRXE2mj3mvvvWumnwPpSxASss0MlBe1\nby4Ly8bkqPVVtcgQGZAfHdNcxzmpG+zzJ/gknpJ2HB/ZfTJMaA4GXGMkONBI\nsi5tod2oxl3cJNwa91q6vkgUqHvJ0KgdL6fmsgnA1tWy4aIJHBoNv8MHqoAL\n5g61UrP1W4mNPCer/wlgXGUti5zqzQ0iCcry629eK94uldDvRVjRmWKmReFD\na+GL7v4yVbbU6xd9MWMa/+Jd0pgFscA+pxw2nh2lwzpZXCzXJ4YhRyCxec25\n6hwm3hOkdVgw2CM2PsNv+3K8OWZiKpJuPssL9tHuPrIpPQ+GpDrEcqHF3xUg\n28WWOSjx1Jm+15pyPZ9HodXj01/cZuvZflSBnxisZoqtnKYFCSzxxmj3jRRp\n3AUCC/mgsjtXQWtV6VTgA3VFfB1HOxfn+uVo3ymqPWDe1mlTOciDFR9FSm/Q\nTNNx\r\n=kcyD\r\n-----END PGP SIGNATURE-----\r\n"
},
"gitHead": "83699cdd74814f0ad2b6cdc95aefdd07be4109db",
"homepage": "https://github.com/browserify/insert-module-globals",
"keywords": [
"__filename",
"__dirname",
"global",
"process",
"module-deps",
"browser-pack",
"browserify"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "ahdinosaur",
"email": "michael.williams@enspiral.com"
},
{
"name": "anandthakker",
"email": "vestibule@anandthakker.net"
},
{
"name": "ashaffer88",
"email": "darawk@gmail.com"
},
{
"name": "balupton",
"email": "b@lupton.cc"
},
{
"name": "bpostlethwaite",
"email": "post.ben.here@gmail.com"
},
{
"name": "bret",
"email": "bcomnes@gmail.com"
},
{
"name": "cwmma",
"email": "calvin.metcalf@gmail.com"
},
{
"name": "dcousens",
"email": "npm@dcousens.com"
},
{
"name": "dominictarr",
"email": "dominic.tarr@gmail.com"
},
{
"name": "elnounch",
"email": "contact@elnounch.net"
},
{
"name": "emilbayes",
"email": "github@tixz.dk"
},
{
"name": "feross",
"email": "feross@feross.org"
},
{
"name": "forbeslindesay",
"email": "forbes@lindesay.co.uk"
},
{
"name": "fpereira1",
"email": "pereira.filype@gmail.com"
},
{
"name": "garann",
"email": "garann@gmail.com"
},
{
"name": "gkatsev",
"email": "me@gkatsev.com"
},
{
"name": "goto-bus-stop",
"email": "rene@kooi.me"
},
{
"name": "hughsk",
"email": "hughskennedy@gmail.com"
},
{
"name": "indutny",
"email": "fedor@indutny.com"
},
{
"name": "jmm",
"email": "npm-public@jessemccarthy.net"
},
{
"name": "jprichardson",
"email": "jprichardson@gmail.com"
},
{
"name": "jryans",
"email": "jryans@gmail.com"
},
{
"name": "leichtgewicht",
"email": "martin.heidegger@gmail.com"
},
{
"name": "mafintosh",
"email": "mathiasbuus@gmail.com"
},
{
"name": "mattdesl",
"email": "dave.des@gmail.com"
},
{
"name": "maxogden",
"email": "max@maxogden.com"
},
{
"name": "mellowmelon",
"email": "palmermebane@gmail.com"
},
{
"name": "parshap",
"email": "parshap+npm@gmail.com"
},
{
"name": "pkrumins",
"email": "peteris.krumins@gmail.com"
},
{
"name": "sethvincent",
"email": "sethvincent@gmail.com"
},
{
"name": "stevemao",
"email": "maochenyan@gmail.com"
},
{
"name": "substack",
"email": "substack@gmail.com"
},
{
"name": "tehshrike",
"email": "me@JoshDuff.com"
},
{
"name": "terinjokes",
"email": "terinjokes@gmail.com"
},
{
"name": "thlorenz",
"email": "thlorenz@gmx.de"
},
{
"name": "ungoldman",
"email": "ungoldman@gmail.com"
},
{
"name": "yerkopalma",
"email": "yerko.palma@usach.cl"
},
{
"name": "yoshuawuyts",
"email": "yoshuawuyts@gmail.com"
},
{
"name": "zertosh",
"email": "zertosh@gmail.com"
}
],
"name": "insert-module-globals",
"optionalDependencies": {},
"readme": "# insert-module-globals\n\ninsert implicit module globals\n(`__filename`, `__dirname`, `process`, `global`, `setImmediate`, `clearImmediate` and `Buffer`)\nas a browserify-style transform\n\n[](http://travis-ci.org/browserify/insert-module-globals)\n\n# example\n\n``` js\nvar mdeps = require('module-deps');\nvar bpack = require('browser-pack');\nvar insert = require('insert-module-globals');\nfunction inserter (file) {\n return insert(file, { basedir: __dirname + '/files' });\n}\n\nvar files = [ __dirname + '/files/main.js' ];\nmdeps(files, { transform: inserter })\n .pipe(bpack({ raw: true }))\n .pipe(process.stdout)\n;\n```\n\n```\n$ node example/insert.js | node\nin main.js: {\"__filename\":\"/main.js\",\"__dirname\":\"/\"}\nin foo/index.js: {\"__filename\":\"/foo/index.js\",\"__dirname\":\"/foo\"}\n```\n\nor use the command-line scripts:\n\n```\n$ module-deps main.js | insert-module-globals | browser-pack | node\nin main.js: {\"__filename\":\"/main.js\",\"__dirname\":\"/\"}\nin foo/index.js: {\"__filename\":\"/foo/index.js\",\"__dirname\":\"/foo\"}\n```\n\nor use insert-module-globals as a transform:\n\n```\n$ module-deps main.js --transform insert-module-globals | browser-pack | node\nin main.js: {\"__filename\":\"/main.js\",\"__dirname\":\"/\"}\nin foo/index.js: {\"__filename\":\"/foo/index.js\",\"__dirname\":\"/foo\"}\n```\n\n# methods\n\n``` js\nvar insertGlobals = require('insert-module-globals')\n```\n\n## var inserter = insertGlobals(file, opts)\n\nReturn a transform stream `inserter` for the filename `file` that will accept a\njavascript file as input and will output the file with a closure around the\ncontents as necessary to define extra builtins.\n\nWhen `opts.always` is true, wrap every file with all the global variables\nwithout parsing. This is handy because parsing the scope can take a long time,\nso you can prioritize fast builds over saving bytes in the final output. When\n`opts.always` is truthy but not true, avoid parsing but perform a quick test to\ndetermine if wrapping should be skipped.\n\nUse `opts.vars` to override the default inserted variables, or set\n`opts.vars[name]` to `undefined` to not insert a variable which would otherwise\nbe inserted.\n\n`opts.vars` properties with a `.` in their name will be executed instead of the\nparent object if ONLY that property is used. For example, `\"Buffer.isBuffer\"`\nwill mask `\"Buffer\"` only when there is a `Buffer.isBuffer()` call in a file and\nno other references to `Buffer`.\n\nIf `opts.debug` is true, an inline source map will be generated to compensate\nfor the extra lines.\n\n# events\n\n## inserter.on('global', function (name) {})\n\nWhen a global is detected, the inserter stream emits a `'global'` event.\n\n# usage\n\n```\nusage: insert-module-globals {basedir}\n```\n\n# install\n\nWith [npm](https://npmjs.org), to get the library do:\n\n```\nnpm install insert-module-globals\n```\n\nand to get the bin script do:\n\n```\nnpm install -g insert-module-globals\n```\n\n# insert custom globals.\n\n`insert-module-globals` can also insert arbitary globals into files.\nPass in an object of functions as the `vars` option.\n\n``` js\nvar vars = {\n process: function (file, basedir) {\n return {\n id: \"path/to/custom_process.js\",\n source: customProcessContent\n }\n },\n Buffer: function (file, basedir) {\n return {\n id: 'path/to/custom_buffer.js',\n source: customProcessContent,\n //suffix is optional\n //it's used to extract the value from the module.\n //it becomes: require(...).Buffer in this case.\n suffix: '.Buffer'\n }\n },\n Math: function () {\n //if you return a string,\n //it's simply set as the value.\n return '{}'\n //^ any attempt to use Math[x] will throw!\n }\n}\n\nfunction inserter (file) {\n return insert(file, { vars: vars });\n}\nmdeps(files, { transform: inserter })\n .pipe(bpack({ raw: true }))\n .pipe(process.stdout)\n```\n\n\n# license\n\nMIT\n",
"readmeFilename": "readme.markdown",
"repository": {
"type": "git",
"url": "git://github.com/browserify/insert-module-globals.git"
},
"scripts": {
"test": "tape test/*.js"
},
"version": "7.2.0"
}