UNPKG

@zendesk/zcli-themes

Version:

zcli theme commands live here

18 lines (17 loc) 590 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const fs = require("fs"); function rewriteTemplates(themePath, templates) { for (const [identifier, content] of Object.entries(templates)) { const filePath = `${themePath}/templates/${identifier}.hbs`; if (typeof content === 'string') { try { fs.writeFileSync(filePath, content); } catch (error) { // Ignore errors if file doesn't exist or can't be written } } } } exports.default = rewriteTemplates;