Skip to content

Instantly share code, notes, and snippets.

@ndmanvar
Created May 2, 2022 20:34
Show Gist options
  • Save ndmanvar/0fb4c60092a0314b5d6bafdd8ad46bf9 to your computer and use it in GitHub Desktop.
Save ndmanvar/0fb4c60092a0314b5d6bafdd8ad46bf9 to your computer and use it in GitHub Desktop.
var validate = require('sourcemap-validator')
, fs = require('fs')
, assert = require('assert')
, myArgs = process.argv.slice(2)
, min = fs.readFileSync(myArgs[0], 'utf-8')
, map = fs.readFileSync(myArgs[1], 'utf-8');
// Browserify bundles have inline sourceContent in their maps
// so no need to pass a `sourceContent` object.
assert.doesNotThrow(function () {
validate(min, map);
}, 'The sourcemap is not valid');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment