JSPM

generate-source-map

0.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1580
  • Score
    100M100P100Q109897F
  • License MIT

Generates an identity source-map from a javascript file

Package Exports

  • generate-source-map

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (generate-source-map) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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());