handle dependencies/partials for html output
refactor js output to expose template source