(filepath, options)
| 2 | import heml from '../../' |
| 3 | |
| 4 | async function renderHemlFile (filepath, options) { |
| 5 | const contents = await readFile(filepath, 'utf8') |
| 6 | const startTime = process.hrtime() |
| 7 | const results = await heml(contents, options) |
| 8 | results.metadata.time = Math.round(process.hrtime(startTime)[1] / 1000000) |
| 9 | |
| 10 | return results |
| 11 | } |
| 12 | |
| 13 | export default renderHemlFile |