Skip to content
This repository has been archived by the owner on Aug 2, 2018. It is now read-only.

Extract the sourcemap from a JS or CSS file as JSON

Notifications You must be signed in to change notification settings

faucet-pipeline/extract-sourcemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extract-sourcemap

npm Build Status Greenkeeper badge

This package is no longer maintained

Extract the sourcemap from a JS or CSS file

Usage via CLI

Provide the name of the file you want to extract the sourcemap from, then provide the keys of the sourcemap you want to extract:

extract-sourcemap index.js version

This will output the sourcemap in JSON format:

{"version":3}

Usage as a library

Provide the source you want to extract the sourcemap from as a String or Buffer and provide the keys of the sourcemap you want to extract as an array:

let extractSourcemap = require("extract-sourcemap");

let source = "...";
let map = extractSourcemap(source, ["version"]);

You will get back the sourcemap as an Object.

License

extract-sourcemap is licensed under MPL-2.0 License.

About

Extract the sourcemap from a JS or CSS file as JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published