UNPKG

layaair2-cmd

Version:

layaair version 2 toolkit

112 lines (111 loc) 6 kB
{ "_args": [ [ { "raw": "combine-source-map@~0.8.0", "scope": null, "escapedName": "combine-source-map", "name": "combine-source-map", "rawSpec": "~0.8.0", "spec": ">=0.8.0 <0.9.0", "type": "range" }, "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\browser-pack" ] ], "_from": "combine-source-map@>=0.8.0 <0.9.0", "_id": "combine-source-map@0.8.0", "_inCache": true, "_location": "/combine-source-map", "_nodeVersion": "6.7.0", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", "tmp": "tmp/combine-source-map-0.8.0.tgz_1490008573978_0.022306202445179224" }, "_npmUser": { "name": "thlorenz", "email": "thlorenz@gmx.de" }, "_npmVersion": "2.15.11", "_phantomChildren": {}, "_requested": { "raw": "combine-source-map@~0.8.0", "scope": null, "escapedName": "combine-source-map", "name": "combine-source-map", "rawSpec": "~0.8.0", "spec": ">=0.8.0 <0.9.0", "type": "range" }, "_requiredBy": [ "/browser-pack", "/insert-module-globals" ], "_resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", "_shasum": "a58d0df042c186fcf822a8e8015f5450d2d79a8b", "_shrinkwrap": null, "_spec": "combine-source-map@~0.8.0", "_where": "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\browser-pack", "author": { "name": "Thorsten Lorenz", "email": "thlorenz@gmx.de", "url": "http://thlorenz.com" }, "bugs": { "url": "https://github.com/thlorenz/combine-source-map/issues" }, "dependencies": { "convert-source-map": "~1.1.0", "inline-source-map": "~0.6.0", "lodash.memoize": "~3.0.3", "source-map": "~0.5.3" }, "description": "Add source maps of multiple files, offset them and then combine them into one source map", "devDependencies": { "tap": "~0.4.3" }, "directories": {}, "dist": { "shasum": "a58d0df042c186fcf822a8e8015f5450d2d79a8b", "tarball": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz" }, "engine": { "node": ">=0.6" }, "gitHead": "a75f6c2461943239a9d32a4413f226667bc82fd0", "homepage": "https://github.com/thlorenz/combine-source-map", "keywords": [ "source", "map", "sourcemap", "bundle", "combine", "cat", "sourceMappingUrl", "browserify" ], "license": "MIT", "main": "index.js", "maintainers": [ { "name": "thlorenz", "email": "thlorenz@gmx.de" }, { "name": "zertosh", "email": "zertosh@gmail.com" } ], "name": "combine-source-map", "optionalDependencies": {}, "readme": "# combine-source-map [![build status](https://secure.travis-ci.org/thlorenz/combine-source-map.png)](http://travis-ci.org/thlorenz/combine-source-map)\n\nAdd source maps of multiple files, offset them and then combine them into one source map.\n\n```js\nvar convert = require('convert-source-map');\nvar combine = require('combine-source-map');\n\nvar fooComment = '//# sourceMappingURL=data:application/json;base64,eyJ2Z [..] pzJylcbiJdfQ==';\nvar barComment = '//# sourceMappingURL=data:application/json;base64,eyJ2Z [..] VjaycpXG4iXX0=';\n\nvar fooFile = {\n source: '(function() {\\n\\n console.log(require(\\'./bar.js\\'));\\n\\n}).call(this);\\n' + '\\n' + fooComment\n , sourceFile: 'foo.js'\n};\nvar barFile = {\n source: '(function() {\\n\\n console.log(alert(\\'alerts suck\\'));\\n\\n}).call(this);\\n' + '\\n' + barComment\n , sourceFile: 'bar.js'\n};\n\nvar offset = { line: 2 };\nvar base64 = combine\n .create('bundle.js')\n .addFile(fooFile, offset)\n .addFile(barFile, { line: offset.line + 8 })\n .base64();\n\nvar sm = convert.fromBase64(base64).toObject();\nconsole.log(sm);\n```\n\n```\n{ version: 3,\n file: 'bundle.js',\n sources: [ 'foo.coffee', 'bar.coffee' ],\n names: [],\n mappings: ';;;AAAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ;;;;;ACAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ',\n sourcesContent:\n [ 'console.log(require \\'./bar.js\\')\\n',\n 'console.log(alert \\'alerts suck\\')\\n' ] }\n```\n\n## Installation\n\n npm install combine-source-map\n\n## API\n\n### create()\n\n```\n/**\n * @name create\n * @function\n * @param file {String} optional name of the generated file\n * @param sourceRoot { String} optional sourceRoot of the map to be generated\n * @return {Object} Combiner instance to which source maps can be added and later combined\n */\n```\n\n### Combiner.prototype.addFile(opts, offset)\n\n```\n/**\n * Adds map to underlying source map.\n * If source contains a source map comment that has the source of the original file inlined it will offset these\n * mappings and include them.\n * If no source map comment is found or it has no source inlined, mappings for the file will be generated and included\n * \n * @name addMap\n * @function\n * @param opts {Object} { sourceFile: {String}, source: {String} }\n * @param offset {Object} { line: {Number}, column: {Number} }\n */\n```\n\n### Combiner.prototype.base64()\n\n```\n/**\n* @name base64\n* @function\n* @return {String} base64 encoded combined source map\n*/\n```\n\n### Combiner.prototype.comment()\n\n```\n/**\n * @name comment\n * @function\n * @return {String} base64 encoded sourceMappingUrl comment of the combined source map\n */\n```\n\n### removeComments(src)\n\n```\n/**\n * @name removeComments\n * @function\n * @param src \n * @return {String} src with all sourceMappingUrl comments removed\n */\n```\n\n## Example \n\nRead and run the [more elaborate example](https://github.com/thlorenz/combine-source-map/blob/master/example/two-files.js) \nin order to get a better idea how things work.\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/thlorenz/combine-source-map.git" }, "scripts": { "test": "tap test/*.js" }, "version": "0.8.0" }