-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
53 lines (53 loc) · 4.45 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
"name": "inline-source-map",
"version": "0.5.0",
"description": "Adds source mappings and base64 encodes them, so they can be inlined in your generated file.",
"main": "index.js",
"scripts": {
"test-main": "tap test/*.js",
"test-0.8": "nave use 0.8 npm run test-main",
"test-0.10": "nave use 0.10 npm run test-main",
"test-0.12": "nave use 0.12 npm run test-main",
"test-all": "npm run test-main && npm run test-0.8 && npm run test-0.10 && npm run test-0.12",
"test": "if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi"
},
"repository": {
"type": "git",
"url": "git://github.com/thlorenz/inline-source-map.git"
},
"homepage": "https://github.com/thlorenz/inline-source-map",
"dependencies": {
"source-map": "~0.4.0"
},
"devDependencies": {
"tap": "~0.7.0",
"nave": "~0.5.0"
},
"keywords": [
"source",
"map",
"inline",
"base64",
"bundle",
"generate",
"transpile"
],
"author": {
"name": "Thorsten Lorenz",
"email": "thlorenz@gmx.de",
"url": "http://thlorenz.com"
},
"license": "MIT",
"engine": {
"node": ">=0.6"
},
"readme": "# inline-source-map [![build status](https://secure.travis-ci.org/thlorenz/inline-source-map.png)](http://travis-ci.org/thlorenz/inline-source-map)\n\nAdds source mappings and base64 encodes them, so they can be inlined in your generated file.\n\n```js\nvar generator = require('inline-source-map');\n\n// default charset 'utf-8' is configurable\nvar gen = generator({ charset: 'utf-8' }) \n .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 })\n .addGeneratedMappings('bar.js', 'var a = 2;\\nconsole.log(a)', { line: 23, column: 22 });\n\nconsole.log('base64 mapping:', gen.base64Encode());\nconsole.log('inline mapping url:', gen.inlineMappingUrl());\n```\n\n```\nbase64 mapping: eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O1VBQ0c7Ozs7Ozs7Ozs7Ozs7O3NCQ0RIO3NCQUNBIn0=\ninline mapping url: //@ sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmb28uanMiLCJiYXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O1VBQ0c7Ozs7Ozs7Ozs7Ozs7O3NCQ0RIO3NCQUNBIn0=\n```\n\n## API\n\n### addMappings(sourceFile, mappings, offset)\n\n```\n/**\n * Adds the given mappings to the generator and offsets them if offset is given \n *\n * @name addMappings\n * @function\n * @param sourceFile {String} name of the source file\n * @param mappings {Array{{Object}} each object has the form { original: { line: _, column: _ }, generated: { line: _, column: _ } }\n * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ }\n * @return {Object} the generator to allow chaining\n */\n```\n\n### addGeneratedMappings(sourceFile, source, offset)\n\n```\n/**\n * Generates mappings for the given source and adds them, assuming that no translation from original to generated is necessary.\n *\n * @name addGeneratedMappings\n * @function\n * @param sourceFile {String} name of the source file\n * @param source {String} source of the file\n * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ }\n * @return {Object} the generator to allow chaining\n */\n```\n\n### addSourceContent(sourceFile, sourceContent)\n\n```\n/**\n * Adds source content for the given source file.\n * \n * @name addSourceContent\n * @function\n * @param sourceFile {String} The source file for which a mapping is included\n * @param sourceContent {String} The content of the source file\n * @return {Object} The generator to allow chaining\n */\n```\n\n\n### base64Encode()\n\n```\n/**\n * @name base64Encode\n * @function\n * @return {String} bas64 encoded representation of the added mappings\n */\n```\n\nIf source contents were added, this will be included in the encoded mappings.\n\n### inlineMappingUrl()\n\n```\n/**\n * @name inlineMappingUrl\n * @function\n * @return {String} comment with base64 encoded representation of the added mappings. Can be inlined at the end of the generated file. \n */\n```\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/thlorenz/inline-source-map/issues"
},
"_id": "inline-source-map@0.5.0",
"_shasum": "4a4c5dd8e4fb5e9b3cda60c822dfadcaee66e0af",
"_from": "inline-source-map@>=0.5.0 <0.6.0",
"_resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz"
}