~ubuntu-branches/ubuntu/vivid/emscripten/vivid

« back to all changes in this revision

Viewing changes to tools/source-maps/sourcemap2json.js

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-09-20 22:44:35 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20130920224435-apuwj4fsl3fqv1a6
Tags: 1.5.6~20130920~6010666-1
* New snapshot release
* Update the list of supported architectures to the same as libv8
  (Closes: #723129)
* emlibtool has been removed from upstream.
* Fix warning syntax-error-in-dep5-copyright
* Refresh of the patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Quick utility script for the Python test script to call. Could be replaced if
 
3
 * a good Python source map library is found.
 
4
 */
 
5
var SourceMapConsumer = require('source-map').SourceMapConsumer;
 
6
var fs = require('fs');
 
7
 
 
8
var consumer = new SourceMapConsumer(fs.readFileSync(process.argv[2], 'utf-8'));
 
9
var mappings = [];
 
10
 
 
11
consumer.eachMapping(function(mapping) {
 
12
  mappings.push(mapping);
 
13
});
 
14
 
 
15
console.log(JSON.stringify(mappings));