{ "_args": [ [ { "raw": "source-map-index-generator@~0.1.1", "scope": null, "escapedName": "source-map-index-generator", "name": "source-map-index-generator", "rawSpec": "~0.1.1", "spec": ">=0.1.1 <0.2.0", "type": "range" }, "/mnt/Data/bach/Sites/clameurs.org/sites/all/themes/figureslibres/clameurs/node_modules/jsmin-sourcemap" ] ], "_from": "source-map-index-generator@>=0.1.1 <0.2.0", "_id": "source-map-index-generator@0.1.2", "_inCache": true, "_location": "/source-map-index-generator", "_npmUser": { "name": "twolfson", "email": "todd@twolfson.com" }, "_npmVersion": "1.2.14", "_phantomChildren": { "amdefine": "1.0.1" }, "_requested": { "raw": "source-map-index-generator@~0.1.1", "scope": null, "escapedName": "source-map-index-generator", "name": "source-map-index-generator", "rawSpec": "~0.1.1", "spec": ">=0.1.1 <0.2.0", "type": "range" }, "_requiredBy": [ "/jsmin-sourcemap" ], "_resolved": "https://registry.npmjs.org/source-map-index-generator/-/source-map-index-generator-0.1.2.tgz", "_shasum": "7b921e4edcb7086e480dc5cd64a32c86f9effabd", "_shrinkwrap": null, "_spec": "source-map-index-generator@~0.1.1", "_where": "/mnt/Data/bach/Sites/clameurs.org/sites/all/themes/figureslibres/clameurs/node_modules/jsmin-sourcemap", "author": { "name": "Todd Wolfson", "email": "todd@twolfson.com", "url": "http://twolfson.com/" }, "bugs": { "url": "https://github.com/twolfson/source-map-index-generator/issues" }, "dependencies": { "char-props": "~0.1.3", "source-map": "~0.1.8" }, "description": "Generate source-maps from index mappings", "devDependencies": { "grunt": "~0.3.17" }, "directories": {}, "dist": { "shasum": "7b921e4edcb7086e480dc5cd64a32c86f9effabd", "tarball": "https://registry.npmjs.org/source-map-index-generator/-/source-map-index-generator-0.1.2.tgz" }, "engines": { "node": ">= 0.6.0" }, "homepage": "https://github.com/twolfson/source-map-index-generator", "keywords": [ "source-map", "sourcemap", "char", "charAt", "index", "generator" ], "licenses": [ { "type": "MIT", "url": "https://github.com/twolfson/source-map-index-generator/blob/master/LICENSE-MIT" } ], "main": "lib/source-map-index-generator", "maintainers": [ { "name": "twolfson", "email": "todd@twolfson.com" } ], "name": "source-map-index-generator", "optionalDependencies": {}, "readme": "# source-map-index-generator [![Donate on Gittip](http://badgr.co/gittip/twolfson.png)](https://www.gittip.com/twolfson/)\n\nGenerate [source-maps][sourcemap] from index mappings.\n\n[sourcemap]: https://github.com/mozilla/source-map\n\n## Getting Started\nInstall the module with: `npm install source-map-index-generator`\n\n```javascript\n// Load in SourceMapIndexGenerator\nvar SourceMapIndexGenerator = require('source-map-index-generator');\n\n// Data output by node-jsmin2\nvar input = [\n '// First line comment',\n 'var test = {',\n ' a: \"b\"',\n '};'\n ].join('\\n'),\n output = 'var test={a:\"b\"};',\n srcFile = 'input.js',\n coordmap = {\"22\":0,\"23\":1,\"24\":2,\"25\":3,\"26\":4,\"27\":5,\"28\":6,\"29\":7,\"31\":8,\"33\":9,\"37\":10,\"38\":11,\"40\":12,\"41\":13,\"42\":14,\"44\":15,\"45\":16};\n\n// Generate source map via SourceMapIndexGenerator\nvar generator = new SourceMapIndexGenerator(generatorProps);\n\n// Add the index coordinate mapping\ngenerator.addIndexMapping({\n src: srcFile,\n input: input,\n output: output,\n map: coordmap\n});\n\n// Collect our source-map\ngenerator.toString(); // {\"version\":3,\"file\":\"min.js\",\"sources\":[\"input.js\"],\"names\":[],\"mappings\":\"AACA,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAE,CACT,CAAC,CAAE,CAAC,CAAC,CACP,CAAC\"}\n```\n\n## Documentation\nThis module returns a constructor for `SourceMapIndexGenerator`.\n\n### new SourceMapIndexGenerator(startOfSourceMap)\n\nTo create a new one, you must pass an object with the following properties:\n\n* `file`: The filename of the generated source that this source map is\n associated with.\n\n* `sourceRoot`: An optional root for all relative URLs in this source map.\n\n### SourceMapIndexGenerator.prototype.addIndexMapping(mapping)\n\nAdd code with an index based mapping to the file collection.\n\nThe mapping object\nshould have the following properties:\n\n* `src`: Filepath to original src.\n\n* `input`: Unminified JavaScript.\n\n* `output`: Minified JavaScript.\n\n* `map`: Map of character index to character index (number -> number)\n\n* `lineOffset`: An optional line offset to add to mappings.\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/gruntjs/grunt).\n\n## License\nCopyright (c) 2013 Todd Wolfson\nLicensed under the MIT license.\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/twolfson/source-map-index-generator.git" }, "scripts": { "test": "grunt test" }, "version": "0.1.2" }