I want to get the import graph of a given ES6 or TypeScript file. I would like the output in a machine readable format, such as DOT or JSON. If TypeScript and ES6 require different tools then I would like both solutions.
Imports are like this:
import foo from 'foo';
import { bar } from 'bar';
What can I use to achieve this?