This guide explains how to use build-graph to build a dependency graph for file-based build systems.
build-graph