(filePath, options)
| 51 | @param {Object} [options] |
| 52 | */ |
| 53 | renderFile(filePath, options) { |
| 54 | let file; |
| 55 | try { |
| 56 | file = fs.readFileSync(filePath, 'utf-8'); |
| 57 | } catch (e) { |
| 58 | throw new SilentError(`The file '${filePath}' doesn't exist. Please check your filePath`); |
| 59 | } |
| 60 | |
| 61 | return this.render(file, options); |
| 62 | } |
| 63 | |
| 64 | /* |
| 65 | Parse markdown and output as string |
no test coverage detected