UNPKG

compodoc

Version:

The missing documentation tool for your Angular application

21 lines (18 loc) 541 B
import * as fs from 'fs-extra'; import * as path from 'path'; import * as Handlebars from 'handlebars'; export class FileEngine { constructor() { } get(filepath:String) { return new Promise(function(resolve, reject) { fs.readFile(path.resolve(process.cwd() + path.sep + filepath), 'utf8', (err, data) => { if (err) { reject('Error during ' + filepath + ' read'); } else { resolve(data); } }); }); } };