1.0.2 • Published 6 years ago

unchanged-file-sourcemap-generator v1.0.2

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

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.

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago