MCPcopy Create free account
hub / github.com/GrapesJS/cli / createI18n

Function createI18n

src/init.ts:85–91  ·  view source on GitHub ↗
(opts = {})

Source from the content-addressed store, hash-verified

83};
84
85const createI18n = (opts = {}) => {
86 const enPath = 'src/locale/en.js';
87 const tmpEn = getTemplateFileContent(enPath);
88 const dstEn = resolveRoot(enPath);
89 ensureDir(dstEn);
90 fs.writeFileSync(dstEn, template(tmpEn)(opts));
91};
92
93const createPackage = (opts = {}) => {
94 const filepath = 'package.json';

Callers 1

initPluginFunction · 0.85

Calls 3

ensureDirFunction · 0.90
getTemplateFileContentFunction · 0.85
resolveRootFunction · 0.85

Tested by

no test coverage detected