{"name":"exorcist","version":"0.3.0","description":"Externalizes the source map found inside a stream to an external `.js.map` file","bin":{"exorcist":"./bin/exorcist.js"},"main":"index.js","scripts":{"test-main":"tap test/*.js","test-0.10":" nave use 0.10 npm run test-main","test-0.12":" nave use 0.12 npm run test-main","test-iojs":" nave use latest npm run test-main","test-all":"npm run test-main && npm run test-0.10 && npm run test-0.12 && npm run test-iojs","test":"if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi"},"repository":{"type":"git","url":"git://github.com/thlorenz/exorcist.git"},"homepage":"https://github.com/thlorenz/exorcist","dependencies":{"minimist":"0.0.5","mold-source-map":"~0.3.0","nave":"~0.5.1"},"devDependencies":{"tap":"~0.4.3","browserify":"~3.20.0","through2":"~0.4.0"},"keywords":["source-map","source","map","external","mapfile","browserify","browserify-tool"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":{"type":"MIT","url":"https://github.com/thlorenz/exorcist/blob/master/LICENSE"},"engine":{"node":">=0.6"},"gitHead":"95335c614dbf4a00ae8420b0479b4f586742bb82","bugs":{"url":"https://github.com/thlorenz/exorcist/issues"},"_id":"exorcist@0.3.0","_shasum":"1d71eb82e370b5992a3e4a24c83cb049ca26a417","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"thlorenz","email":"thlorenz@gmx.de"},"maintainers":[{"name":"thlorenz","email":"thlorenz@gmx.de"}],"dist":{"shasum":"1d71eb82e370b5992a3e4a24c83cb049ca26a417","tarball":"http://registry-npm.ywwl.com/exorcist/download/exorcist-0.3.0.tgz","integrity":"sha512-NWYooxd1baQMSJe3SAN3CX18F36U0G6CRxh+R4OyGZuePEArVDNdOHmy1z0DYpSOURrGcDsMvt3tiW2KgGmdtg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJ0RlZ5+2aHA0nt6TMlAF5/iuH0KUAqIVKjj6dDqkSNAIhANACVhdGCrhVlwgpnufl/A/+GkUsgDHRAcpmSbmHmyIE"}],"size":7892,"noattachment":false,"key":"/exorcist/-/exorcist-0.3.0.tgz"},"directories":{},"readme":"# exorcist [![build status](https://secure.travis-ci.org/thlorenz/exorcist.svg?branch=master)](http://travis-ci.org/thlorenz/exorcist)\n\n<a href=\"https://www.patreon.com/bePatron?u=8663953\"><img alt=\"become a patron\" src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\" height=\"35px\"></a>\n\nExternalizes the source map found inside a stream to an external `.map` file or stream.\n\nWorks with both JavaScript and CSS input streams.\n\n```js\nvar browserify = require('browserify')\n  , path       = require('path')\n  , fs         = require('fs')\n  , exorcist   = require('exorcist')\n  , mapfile    = path.join(__dirname, 'bundle.js.map')\n\n// from a file, to a file, and send source map to its own file\nbrowserify({debug: true})\n  .require(require.resolve('./main'), { entry: true })\n  .bundle()\n  .pipe(exorcist(mapfile))\n  .pipe(fs.createWriteStream(path.join(__dirname, 'bundle.js'), 'utf8'))\n\n//  from a stream, to a stream, and send source map to a stream\nbrowserify([readableSourceStream], browserifyOptions)\n  .bundle()\n  .pipe(exorcist(targetSourceMapStream, '/url/path/to/replace/source/comment/with/bundle.js'))\n  .pipe(writableTargetStream)\n```\n\n### command line example\n\n```\nbrowserify main.js --debug | exorcist bundle.js.map > bundle.js\n```\n\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n**Table of Contents**  *generated with [DocToc](http://doctoc.herokuapp.com/)*\n\n- [Usage](#usage)\n- [Installation](#installation)\n- [API](#api)\n- [Integration with other tools](#integration-with-other-tools)\n- [License](#license)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n\n## Usage\n\n```\nexorcist map_file [options]\n\n  Externalizes the source map of the file streamed in.\n\n  The source map is written as JSON to map_file, and the original file is streamed out with its\n  sourceMappingURL set to the path of map_file (or to the value of the --url option).\n\nOPTIONS:\n\n              --base -b   Base path for calculating relative source paths.\n                          (default: use absolute paths)\n\n              --root -r   Root URL for loading relative source paths.\n                          Set as sourceRoot in the source map.\n                          (default: '')\n\n               --url -u   Full URL to source map.\n                          Set as sourceMappingURL in the output stream.\n                          (default: map_file)\n\n  --error-on-missing -e   Abort with error if no map is found in the stream.\n                          (default: warn but still pipe through source)\n\nEXAMPLE:\n\n  Bundle main.js with browserify into bundle.js and externalize the map to bundle.js.map.\n\n    browserify main.js --debug | exorcist bundle.js.map > bundle.js\n```\n\n## Installation\n\n    npm install exorcist\n\n## API\n\n\n<!-- START docme generated API please keep comment here to allow auto update -->\n<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN docme TO UPDATE -->\n\n<div>\n<div class=\"jsdoc-githubify\">\n<section>\n<article>\n<div class=\"container-overview\">\n<dl class=\"details\">\n</dl>\n</div>\n<dl>\n<dt>\n<h4 class=\"name\" id=\"exorcist\"><span class=\"type-signature\"></span>exorcist<span class=\"signature\">(input, <span class=\"optional\">url</span>, <span class=\"optional\">root</span>, <span class=\"optional\">base</span>, <span class=\"optional\">errorOnMissing</span>)</span><span class=\"type-signature\"> &rarr; {TransformStream}</span></h4>\n</dt>\n<dd>\n<div class=\"description\">\n<p>Externalizes the source map of the file streamed in.</p>\n<p>The source map is written as JSON to <code>file</code>, and the original file is streamed out with its\n<code>sourceMappingURL</code> set to the path of <code>file</code> (or to the value of <code>url</code>).</p>\n<h4>Events (in addition to stream events)</h4>\n<ul>\n<li><code>missing-map</code> emitted if no map was found in the stream and errorOnMissing is falsey\n(the src is still piped through in this case, but no map file is written)</li>\n</ul>\n</div>\n<h5>Parameters:</h5>\n<table class=\"params\">\n<thead>\n<tr>\n<th>Name</th>\n<th>Type</th>\n<th>Argument</th>\n<th class=\"last\">Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td class=\"name\"><code>input</code></td>\n<td class=\"type\">\n<span class=\"param-type\">String / Object</span>\n</td>\n<td class=\"attributes\">\n</td>\n<td class=\"description last\"><p>full path to the map file to which to write the extracted source map or a writable stream</p></td>\n</tr>\n<tr>\n<td class=\"name\"><code>url</code></td>\n<td class=\"type\">\n<span class=\"param-type\">String</span>\n</td>\n<td class=\"attributes\">\n&lt;optional><br>\n</td>\n<td class=\"description last\"><p>full URL to the map file, set as <code>sourceMappingURL</code> in the streaming output (default: file)</p></td>\n</tr>\n<tr>\n<td class=\"name\"><code>root</code></td>\n<td class=\"type\">\n<span class=\"param-type\">String</span>\n</td>\n<td class=\"attributes\">\n&lt;optional><br>\n</td>\n<td class=\"description last\"><p>root URL for loading relative source paths, set as <code>sourceRoot</code> in the source map (default: '')</p></td>\n</tr>\n<tr>\n<td class=\"name\"><code>base</code></td>\n<td class=\"type\">\n<span class=\"param-type\">String</span>\n</td>\n<td class=\"attributes\">\n&lt;optional><br>\n</td>\n<td class=\"description last\"><p>base path for calculating relative source paths (default: use absolute paths)</p></td>\n</tr>\n<tr>\n<td class=\"name\"><code>errorOnMissing</code></td>\n<td class=\"type\">\n<span class=\"param-type\">Boolean</span>\n</td>\n<td class=\"attributes\">\n&lt;optional><br>\n</td>\n<td class=\"description last\"><p>when truthy, causes 'error' to be emitted instead of 'missing-map' if no map was found in the stream (default: falsey)</p></td>\n</tr>\n</tbody>\n</table>\n<dl class=\"details\">\n<dt class=\"tag-source\">Source:</dt>\n<dd class=\"tag-source\"><ul class=\"dummy\">\n<li>\n<a href=\"https://github.com/thlorenz/exorcist/blob/master/index.js\">index.js</a>\n<span>, </span>\n<a href=\"https://github.com/thlorenz/exorcist/blob/master/index.js#L33\">lineno 33</a>\n</li>\n</ul></dd>\n</dl>\n<h5>Returns:</h5>\n<div class=\"param-desc\">\n<p>transform stream into which to pipe the code containing the source map</p>\n</div>\n<dl>\n<dt>\nType\n</dt>\n<dd>\n<span class=\"param-type\">TransformStream</span>\n</dd>\n</dl>\n</dd>\n</dl>\n</article>\n</section>\n</div>\n\n*generated with [docme](https://github.com/thlorenz/docme)*\n</div>\n<!-- END docme generated API please keep comment here to allow auto update -->\n\n## Integration with other tools\n\n- [using exorcist with gulp](https://github.com/thlorenz/exorcist/wiki/Recipes#gulp)\n\n## License\n\nMIT\n","publish_time":1429633893973,"_cnpm_publish_time":1429633893973,"dist-tags":{"latest":"2.0.0"}}