{"name":"browser-launcher","version":"0.0.2","keywords":["browser","headless","phantom","chrome","firefox","chromium"],"author":{"url":"http://substack.net","name":"James Halliday","email":"mail@substack.net"},"license":"MIT","_id":"browser-launcher@0.0.2","maintainers":[{"name":"substack","email":"mail@substack.net"}],"homepage":"https://github.com/substack/browser-launcher","bin":{},"dist":{"shasum":"6064790e39e6a71a09e2fc61cdefcbb8ce0df67f","tarball":"http://registry-npm.ywwl.com/browser-launcher/download/browser-launcher-0.0.2.tgz","integrity":"sha512-K/QQI/pgvy6J6fnyKCG1q2zuoin4SFurnbLxq8yxMhM7ktOxWRQ9J5ftjnPOnui2jYhX/7QNaSUJ8FLfipiqQg==","signatures":[{"sig":"MEUCIGTaEQ3mQyx++1GNlStUnisseTC3tkYUYc6Zt0c+pYYvAiEAog3scwm7n3g/iKWVoO/AztVZVfF+U6HBqoBQUhQqLgY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":5151,"noattachment":false,"key":"/browser-launcher/-/browser-launcher-0.0.2.tgz"},"main":"index.js","engine":{"node":">=0.6"},"repository":{"url":"git://github.com/substack/browser-launcher.git","type":"git"},"description":"detect and launch browser versions, headlessly or otherwise","directories":{"test":"test","example":"example"},"dependencies":{"merge":"~1.0.0","mkdirp":"~0.3.3","headless":"~0.1.0"},"readme":"# browser-launcher\n\nDetect the browser versions available on your system and launch them in an\nisolated profile for automated testing purposes.\n\nYou can launch browsers headlessly (if you have Xvfb) and set\nthe proxy configuration on the fly.\n\n# example\n\n``` js\nvar launcher = require('browser-launcher');\nlauncher(function (err, launch) {\n    if (err) return console.error(err);\n    \n    console.log('# available browsers:');\n    console.dir(launch.browsers);\n    \n    var opts = {\n        headless : true,\n        browser : 'chrome',\n        proxy : 'localhost:7077',\n    };\n    launch('http://substack.net', opts, function (err, ps) {\n        if (err) return console.error(err);\n    });\n});\n```\n\n***\n\n```\n$ node example/launch.js \n# available browsers:\n{ local: \n   [ { name: 'chrome',\n       re: {},\n       type: 'chrome',\n       profile: '/home/substack/.config/browser-launcher/chrome-17.0.963.12_9c0bdd8d',\n       command: 'google-chrome',\n       version: '17.0.963.12' },\n     { name: 'chromium',\n       re: {},\n       type: 'chrome',\n       profile: '/home/substack/.config/browser-launcher/chromium-18.0.1025.168_e025d855',\n       command: 'chromium-browser',\n       version: '18.0.1025.168' },\n     { name: 'firefox',\n       re: {},\n       type: 'firefox',\n       profile: [Object],\n       command: 'firefox',\n       version: '12.0' } ] }\n```\n\n# methods\n\n``` js\nvar launcher = require('browser-launcher')\n```\n\n## launcher(cb)\n\nCreate a new launcher function in `cb(err, launch)`, scanning for system\nbrowsers if no `~/.config/browser-launcher/config.json` is present and reading\nfrom that file otherwise.\n\n## launch(uri, opts, cb)\n\nLaunch a new instance of `opts.browser` with the optional version constraint\n`opts.version`. Without an `opts.version`, the highest version of `opts.browser`\nis used.\n\nTo launch the browser headlessly (if it isn't already headless),\nset `opts.headless`. This launches the browser with\n[node-headless](https://github.com/kesla/node-headless/)\nwhich uses the `Xvfb` command to create a fake X server.\n\nTo use the browser with a proxy, set `opts.proxy` as a colon-separated\n`'host:port'` string.\n\nSet proxy routes to skip over with `opts.noProxy`.\n\nYou can pass additional options directly through to the browser commands with\n`opts.options`.\n\n`cb` fires with `cb(err, ps)` where `ps` is the process object created with\n`spawn()`.\n\n## launch.browsers\n\nThis property shows what browsers are configured to be launchable, divided into\ngroups. The default group is `'local'`.\n\n# install\n\n```\nnpm install browser-launcher\n```\n\n# license\n\nMIT\n","publish_time":1341073384699,"_cnpm_publish_time":1341073384699,"dist-tags":{"beta":"3.0.0-beta.0","latest":"4.0.0"}}