visionmedia/jade — pull request #1520 by gvarsanyi (2014-05-09 01:58:28+00:00)
Title: includedFiles option

Array may be passed as option, will be populated with the names of included files. Coffee example:

jade = require 'jade'

included = []
html = jade.renderFile 'index.jade', {pretty: true, includedFiles: included}
console.log 'included files in index.jade:', included
# prints ['home/joe/Projects/coolstuff/partials/header.jade', 'home/joe/Projects/coolstuff/partials/footer.jade']