How to use the source-map-explorer.explore function in source-map-explorer

To help you get started, we’ve selected a few source-map-explorer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spencermountain / unrequired / src / _get-used-old.js View on Github external
var getUsed = function(input) {
  //browserify + derequire
  var cmd = browserify + ' ' + input + ' --debug -t [ babelify ]'
  cmd += ' >> ' + output
  exec(cmd)

  srcMapExplorer(output, {
    json: true,
  }).then(files => {
    console.log(files)
    files = Object.keys(files)

    files = files.map(function(str) {
      str = path.resolve(str)
      return str
    })
    //clean it up a bit
    files = files.filter(function(str) {
      if (!str) {
        return false
      }
      if (/_prelude.js$/.test(str)) {
        return false

source-map-explorer

Analyze and debug space usage through source maps

Apache-2.0
Latest version published 2 years ago

Package Health Score

69 / 100
Full package analysis