Pure JS dependency chain generator for Sprockets