- Sort typescript files in order of dependency.
- Find exported elements (classes, modules, variables) in typescript files.
- Find usage of exported elements in files.
- Create a dependency graph.
npm install --save-dev typescript-dependency-util
var tdu = require('typescript-dependency-util');
var glob = require('glob');
var sourceFiles = glob.sync('./src/**/*.ts');
var sortedArrayOfTypescriptFiles = tdu.createSortedFileList(sourceFiles);