nyc-bookstores/node_modules/browserify/node_modules/browser-pack/package.json
2013-05-27 13:45:59 -07:00

66 lines
3.6 KiB
JSON

{
"name": "browser-pack",
"version": "0.5.0",
"description": "pack node-style source files from a json stream into a browser bundle",
"main": "index.js",
"bin": {
"browser-pack": "cmd.js"
},
"dependencies": {
"JSONStream": "~0.4.3",
"duplexer": "~0.0.3",
"through": "~2.2.0",
"uglify-js": "1.3.4",
"combine-source-map": "~0.1.0"
},
"devDependencies": {
"tap": "~0.4.0",
"tape": "~0.2.2",
"convert-source-map": "~0.2.3",
"parse-base64vlq-mappings": "~0.1.1"
},
"scripts": {
"test": "tap test/*.js"
},
"testling": {
"files": "test/*.js",
"browsers": [
"ie/8",
"ie/9",
"ie/10",
"chrome/15",
"chrome/latest",
"firefox/10",
"firefox/latest",
"safari/latest",
"opera/latest"
]
},
"repository": {
"type": "git",
"url": "git://github.com/substack/browser-pack.git"
},
"homepage": "https://github.com/substack/browser-pack",
"keywords": [
"browser",
"bundle",
"commonjs",
"commonj-esque",
"exports",
"module.exports",
"require"
],
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"license": "MIT",
"readme": "# browser-pack\n\npack node-style source files from a json stream into a browser bundle\n\n[![browser support](http://ci.testling.com/substack/browser-pack.png)](http://ci.testling.com/substack/browser-pack)\n\n[![build status](https://secure.travis-ci.org/substack/browser-pack.png)](http://travis-ci.org/substack/browser-pack)\n\n# example\n\njson input:\n\n``` json\n[\n {\n \"id\": \"a1b5af78\",\n \"source\": \"console.log(require('./foo')(5))\",\n \"deps\": { \"./foo\": \"b8f69fa5\" },\n \"entry\": true\n },\n {\n \"id\": \"b8f69fa5\",\n \"source\": \"module.exports = function (n) { return n * 111 }\",\n \"deps\": {}\n }\n]\n```\n\nbundle script:\n\n``` js\nvar pack = require('browser-pack')();\nprocess.stdin.pipe(pack).pipe(process.stdout);\nprocess.stdin.resume();\n```\n\noutput:\n\n```\n$ browser-pack < input.json\n(function(p,c,e){function r(n){if(!c[n]){c[n]={exports:{}};p[n][0](function(x){return r(p[n][1][x])},c[n],c[n].exports);}return c[n].exports}for(var i=0;i<e.length;i++)r(e[i]);return r})({\"a1b5af78\":[function(require,module,exports){console.log(require('./foo')(5))},{\"./foo\":\"b8f69fa5\"}],\"b8f69fa5\":[function(require,module,exports){module.exports = function (n) { return n * 111 }},{}]},{},[\"a1b5af78\",\"b8f69fa5\"])\n```\n\n# methods\n\n``` js\nvar pack = require('browser-pack');\n```\n\n## pack(opts)\n\nReturn a through stream that takes a stream of json input and produces a stream\nof javascript output. This module does not export its internal `require()`\nfunction but you can prepend `'var require='` to the stream contents to get the\nrequire function. `require()` will return `undefined` when a module hasn't been\ndefined to support splitting up modules across several bundles with custom\nfallback logic.\n\nIf `opts.raw` is given, the writable end of the stream will expect objects to be\nwritten to it instead of expecting a stream of json text it will need to parse.\n\nAdditionally, rows with a truthy `entry` may have an `order` field that\ndetermines the numeric index to execute the entries in.\n\n# install\n\nWith [npm](https://npmjs.org), to get the library do:\n\n```\nnpm install browser-pack\n```\n\nand to get the command-line tool do:\n\n```\nnpm install -g browser-pack\n```\n\n# license\n\nMIT\n",
"_id": "browser-pack@0.5.0",
"dist": {
"shasum": "5b7e46dd22c4dcf97624b9057f696ea0eea9a502"
},
"_from": "browser-pack@~0.5.0"
}