Skip to content

meixg/unchanged-file-sourcemap-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unchanged-file-sourcemap-generator

generate sourcemap from an unchanged js file.

why

Sometimes we just want to combine some js files into one, and generate a sourcemap. In this situation, some js file may not need to be compiled by babel or some other compiler. Sourcemaps for these files need to be generated on our own.

Fortunately, this module can do this for you.

quick start

const generate = require('unchanged-file-sourcemap-generator');

const map = generate(sourceString, {
    file: 'index.js',
    sourceRoot: ''
});

options

options are same as https://github.com/mozilla/source-map#new-sourcemapgeneratorstartofsourcemap.

  • file

The filename of the generated source that this source map is associated with.

  • sourceRoot

A root for all relative URLs in this source map.

About

generate sourcemap from an unchanged js file.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published