Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meixg/unchanged-file-sourcemap-generator
generate sourcemap from an unchanged js file.
https://github.com/meixg/unchanged-file-sourcemap-generator
sourcemap
Last synced: 16 days ago
JSON representation
generate sourcemap from an unchanged js file.
- Host: GitHub
- URL: https://github.com/meixg/unchanged-file-sourcemap-generator
- Owner: meixg
- Created: 2018-03-05T10:58:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-25T15:48:56.000Z (almost 7 years ago)
- Last Synced: 2025-01-06T21:07:26.724Z (26 days ago)
- Topics: sourcemap
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```javascript
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](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.