Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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