nyc-bookstores/node_modules/browserify/package.json

60 lines
11 KiB
JSON
Raw Normal View History

2013-05-27 20:45:59 +00:00
{
"name": "browserify",
"version": "2.7.2",
"description": "browser-side require() the node way",
"main": "index.js",
"bin": {
"browserify": "bin/cmd.js"
},
"repository": {
"type": "git",
"url": "http://github.com/substack/node-browserify.git"
},
"keywords": [
"browser",
"require",
"commonjs",
"commonj-esque",
"bundle",
"npm",
"javascript"
],
"dependencies": {
"module-deps": "~0.5.0",
"browser-pack": "~0.5.0",
"shell-quote": "~0.0.1",
"through": "~2.2.0",
"duplexer": "~0.0.2",
"concat-stream": "~0.1.1",
"insert-module-globals": "~0.2.0",
"syntax-error": "~0.0.0",
"browser-resolve": "~0.0.3",
"inherits": "~1.0.0",
"optimist": "~0.3.5",
"JSONStream": "~0.4.3"
},
"devDependencies": {
"tap": "~0.4.0",
"mkdirp": "~0.3.3",
"backbone": "~0.9.2",
"dnode": "~1.0.3",
"seq": "0.3.3",
"coffee-script": "~1.5.0"
},
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"scripts": {
"test": "tap test/*.js"
},
"license": "MIT",
"readme": "# browserify\n\n`require('modules')` in the browser\n\nUse a [node](http://nodejs.org)-style `require()` to organize your browser code\nand load modules installed by [npm](https://npmjs.org).\n\nbrowserify will recursively analyze all the `require()` calls in your app in\norder to build a bundle you can serve up to the browser in a single `<script>`\ntag.\n\n[![build status](https://secure.travis-ci.org/substack/node-browserify.png)](http://travis-ci.org/substack/node-browserify)\n\n![browserify!](http://substack.net/images/browserify/browserify.png)\n\n# example\n\nWhip up a file, `main.js` with some `require()s` in it. You can use relative\npaths like `'./foo'` and `'../lib/bar'` or module paths like `'gamma'` that will\nsearch `node_modules/` using\n[node's module lookup algorithm](https://github.com/substack/node-resolve).\n\n``` js\nvar foo = require('./foo');\nvar bar = require('../lib/bar');\nvar gamma = require('gamma');\n\nvar elem = document.getElementById('result');\nvar x = foo(100) + bar('baz');\nelem.textContent = gamma(x);\n```\n\nNow just use the `browserify` command to build a bundle starting at `main.js`:\n\n```\n$ browserify main.js > bundle.js\n```\n\nAll of the modules that `entry.js` needs are included in the `bundle.js` from a\nrecursive walk of the `require()` graph using\n[required](https://github.com/shtylman/node-required).\n\nTo use this bundle, just toss a `<script src=\"bundle.js\"></script>` into your\nhtml!\n\n## external requires\n\nYou can just as easily create bundle that will export a `require()` function so\nyou can `require()` modules from another script tag. Here we'll create a\n`bundle.js` with the [through](https://npmjs.org/package/through)\nand [duplexer](https://npmjs.org/package/duplexer) modules.\n\n```\n$ browserify -r through -r duplexer > bundle.js\n```\n\nThen in your page you can do:\n\n``` js\n<script src=\"bundle.js\"></script>\n<script>\n var through = require('through');\n var duplexer = require('duplexer');\n /* ... */\n</script>\n```\n\n## multiple bundles\n\nIf browserify finds a `require` function already defined in the page scope, it\nwill fall back to that function if it didn't find any matches in its own set of\nbundled modules.\n\nIn this way you can use browserify to split up bundles among multiple pages to\nget the benefit of caching for shared, infrequently-changing modules, while\nstill being able to use `require()`. Just use a combination of `--external` and\n`--require` to factor out common dependencies.\n\nFor example, if a website with 2 pages, `beep.js`:\n\n``` js\nvar robot = require('./robot');\nconsole.log(robot('beep'));\n```\n\nand `boop.js`:\n\n``` js\nvar robot = require('./robot');\nconsole.log(robot('boop'));\n```\n\nboth depend on `robot.js`:\n\n``` js\nmodule.exports = function (s) { return s.toUpperCase() + '!' };\n```\n\n```\n$ browserify -r ./robot > static/common.js\n$ browserify -x ./robot.js beep.js > static/beep.js\n$ browserify -x ./robot.js boop.js > static/boop.js\n```\n\nThen on the beep page you can have:\n\n``` html\n<script src=\"common.js\"></script>\n<script src=\"beep.js\"></script>\n```\n\nwhile the boop page can have:\n\n``` html\n<script src=\"common.js\"></script>\n<script src=\"boop.js\"></script>\n```\n\n# usage\n\n```\nUsage: browserify [entry files] {OPTIONS}\n\nStandard Options:\n\n --outfile, -o Write the browserify bundle to this file.\n If unspecified, browserify prints to stdout.\n\n --require, -r A module name or file to bundle.require()\n Optionally use a colon separator to set the target.\n\n --entry, -e An entry point of your app\n \n --ignore, -i Omit a file from the output bundle.\n\n --external, -x Reference a file from another bundle.\n \n --transform, -t Use a transform module on top-level files.\n \n --command, -c Use a transform command on top-level files.\n\n --help, -h Show this message\n\nAdvanced Options:\n\n --insert-globals, --ig, --fast [default: false]\n\n Skip detection and always insert definit
"_id": "browserify@2.7.2",
"dist": {
"shasum": "2be290d43e4523c6b494df6a5fda96e34ccce16f"
},
"_from": "browserify"
}