generate-source-map
v0.0.5
Published
Generates an identity source-map from a javascript file
Downloads
9,507
Readme
generate-source-map
Generates an identity source-map from a javascript file
Can be used with combine-source-map
to generate source-maps with correct line and column information before bundling.
Installation
$ npm install generate-source-map
Usage
var generate = require('generate-source-map');
var fs = require('fs');
var file = {
source: fs.readFileSync('test.js'),
sourceFile: 'test.js'
};
var map = generate(file);
console.log(map.toString());