{"name":"exorcist","version":"2.0.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":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/thlorenz/exorcist.git"},"homepage":"https://github.com/thlorenz/exorcist","dependencies":{"is-stream":"^2.0.0","minimist":"^1.2.5","mkdirp":"^1.0.4","mold-source-map":"^0.4.0"},"devDependencies":{"browserify":"^17.0.0","nave":"^3.2.2","proxyquire":"^2.1.3","tap":"^14.11.0","through2":"~4.0.2"},"keywords":["source-map","source","map","external","mapfile","browserify","browserify-tool"],"author":{"name":"Thorsten Lorenz","email":"thlorenz@gmx.de","url":"http://thlorenz.com"},"license":"MIT","engine":{"node":">=14"},"gitHead":"fee3d0924d14dea5d3a1c42303c457a4b1971f7f","bugs":{"url":"https://github.com/thlorenz/exorcist/issues"},"_id":"exorcist@2.0.0","_nodeVersion":"14.15.4","_npmVersion":"7.5.2","dist":{"integrity":"sha512-+c63SvhBq/HjmbV9cu9vkDkjXFiuI4lpqOZU5Y3t5GSV2l4TQCqVli9c7nIASHxkUL4THaOZDUcb6XNBI/eYjw==","shasum":"a732ac62d4ea9413b0508e246b564d01fee62c4b","tarball":"http://registry-npm.ywwl.com/exorcist/download/exorcist-2.0.0.tgz","fileCount":23,"unpackedSize":42824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQVhUCRA9TVsSAnZWagAApNsP/2ymr1jkj9UluigEFhQi\n1785eu9FJZDndTsiKh4MIH/iv7AbB9+v2+OtUV96m8Eh+zFMUKZxnOaHlUeK\nIbkNSiWydUct7G8n2sXAD1Vc22vU+CpVVsOAPuv90yRI8PJ0DA2nXyxGf5SW\nPtPTHHtF3t27CvbzDJxpklONzryyogwP8n4ArsZuSz2SCZr/TGuikjX/zrcS\nwXLxBZOkmAKr7SVi6K78/Nom2ZuBypApY/MdIFu5X9SfYA7nRJR84wuXvE4Y\nhHvnCJB+T+6cLG8wfKEhLDC9YrmAuVUOSiRCayysRSgowQDa0/LGoewaYHHV\nlRQfjQCRWg5RAGKgbGNTFgCjnDuaocyPqAmRQQNLmxPltgb3Py1ZXLkryhvt\ndAam8QnIHPq2CS+bYb9i2onwjHlGpIArsuKePuwOh4LwIint5D4doHovx7B+\nezrMU38DMQB/mdE1gOxoq6kZcjPpA4Xsc62GispI9RgoXfMW2p49ITcvoJ6K\nGhK4S76eoC4o3PZwjT0hk+aCHyM7APtVV93OqL6/BFD5P/SZhPztrm/jtZa6\nL7CMAyuXDkdv+tfoE8O0jiBgsBGGjp60iiUz99KUOJp493MHuYUqUQ4fcYDA\nOQNXbI3BuQ/a7rOjpCY9WU9oidpmgmGPOiNgb3rV3yuMKqFguseh4QLqO9cX\nko/r\r\n=u24s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkPKP89Zc2d3vY3vorLFK67fiZ7fnUh3S+f2+Do7uQZAiEAm88zhBe/K8bcGL4V1k3siyehVu3dWjRYQFxNlYR4uOM="}],"size":11797,"noattachment":false,"key":"/exorcist/-/exorcist-2.0.0.tgz"},"_npmUser":{"name":"bendrucker","email":"bvdrucker@gmail.com"},"directories":{},"maintainers":[{"name":"bendrucker","email":"bvdrucker@gmail.com"},{"name":"thlorenz","email":"thlorenz10@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exorcist_2.0.0_1614895187752_0.16519413780988645"},"_hasShrinkwrap":false,"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":1614895187925,"_cnpm_publish_time":1614895187925,"dist-tags":{"latest":"2.0.0"}}