UNPKG

beaker-plugin-dat

Version:

Dat-protocol plugin for the Beaker browser

17 lines (14 loc) 457 B
const fs = require('fs') const path = require('path') var indexHTML var faviconPNG exports.indexHTML = function ({ key }) { if (!indexHTML) indexHTML = fs.readFileSync(path.join(__dirname, '../new-site-template/index.html'), 'utf8') return indexHTML.replace(/\$DAT_KEY/gi, key) } exports.faviconPNG = function () { if (!faviconPNG) faviconPNG = fs.readFileSync(path.join(__dirname, '../new-site-template/favicon.png')) return faviconPNG }