Teaser image of Rick Tracy

Rick Tracy

  • JS

A node JS library for tracing ES6 and CommonJS imports.


Prior to webpack, our JS build system started to slow down for all our separate JS apps. Instead of building them all at once with Browserify we wanted a smarter system that could look at a changed source file and find all the root applications that depended on it.


  1. Researched existing tools for tracing dependencies
  2. Researched combing ES6 Promises and Streams to recursively crawl up a tree of imports without exhausting memory.
  3. Architected a class hierarchy to divide responsibilities.
  4. Implemented solution in node.
  5. Wrote unit tests.


  • Learned ES6 Promises
  • Made use of the graphing experience with the sass tooling
  • Learned the many nuances of transpiling with Babel from ES6 to ES5
  • It was fun writing all the code to a detective metaphor way:
    // For each lead found start a new investigation
    investigations = leads.map((lead) => {
      return this.trackDown(lead)
        .then((newSuspect) => {
          return this.interrogate(newSuspect, suspect.path);
        .catch(() => {});