MCPcopy
hub / github.com/GrapesJS/grapesjs / createPackage

Function createPackage

packages/cli/src/init.ts:96–107  ·  view source on GitHub ↗
(opts = {})

Source from the content-addressed store, hash-verified

94};
95
96const createPackage = (opts = {}) => {
97 const filepath = 'package.json';
98 const cnt = getTemplateFileContent(filepath);
99 const dst = resolveRoot(filepath);
100 fs.writeFileSync(
101 dst,
102 template(cnt)({
103 ...opts,
104 version,
105 }),
106 );
107};
108
109const checkBoolean = (value) => (value && value !== 'false' ? true : false);
110

Callers 1

initPluginFunction · 0.85

Calls 2

getTemplateFileContentFunction · 0.85
resolveRootFunction · 0.85

Tested by

no test coverage detected