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

Function createPackage

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

Source from the content-addressed store, hash-verified

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

Callers 1

initPluginFunction · 0.85

Calls 2

getTemplateFileContentFunction · 0.85
resolveRootFunction · 0.85

Tested by

no test coverage detected