Created
December 18, 2018 04:05
-
-
Save samccone/1fc251093f6e481be72a5b35b359ee1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
buildEnd() { | |
const deps = []; | |
Array.from(this.moduleIds).forEach(v => { | |
let m = this.getModuleInfo(v); | |
if (m != null && !m.isExternal) { | |
for (const source of m.importedIds) { | |
deps.push({ target: m.id, source}) | |
} | |
} | |
}); | |
fs.writeFileSync(path.join(__dirname, 'graph.json'), JSON.stringify(deps, null, 2)); | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment