UNPKG

preact-material-components

Version:
20 lines (15 loc) 386 B
// Native const path = require('path') // Packages const fs = require('fs-extra') const { compile } = require('handlebars') module.exports = () => { let viewContent = false const viewPath = path.normalize(path.join(__dirname, '/../views/index.hbs')) try { viewContent = fs.readFileSync(viewPath, 'utf8') } catch (err) { throw err } return compile(viewContent) }