npm

Need private packages and team management tools?Check out npm Orgs. »

generate-sourcemap

0.1.0 • Public • Published

generate sourcemap build status

Generates a source map for files that were packed into a bundle.

var create = require('generate-sourcemap');
var gen = create('bundle.js');
var ranges = [
    { sourceFile: 'foo.js', start: 3, end: 5 }
  , { sourceFile: 'bar.js', start: 6, end: 15 }
];
 
gen.addRanges(ranges);
 
console.log('source map for ranges:\n', ranges);
console.log('is: \n', gen.getMap());

Output:

source map for ranges:
 [ { sourceFile: 'foo.js', start: 3, end: 5 },
  { sourceFile: 'bar.js', start: 6, end: 15 } ]
is: 
 {"version":3,"file":"bundle.js","sources":["foo.js","bar.js"],"names":[],"mappings":";;;AAAA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}

Keywords

none

install

npm i generate-sourcemap

Downloadsweekly downloads

2

version

0.1.0

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability