MCPcopy Index your code
hub / github.com/EvoMap/evolver / populateOldInstall

Function populateOldInstall

test/forceUpdateMidCopyWedge.test.js:73–82  ·  view source on GitHub ↗
(root, version)

Source from the content-addressed store, hash-verified

71}
72
73function populateOldInstall(root, version) {
74 fs.writeFileSync(
75 path.join(root, 'package.json'),
76 JSON.stringify({ name: '@evomap/evolver', version: version || '1.0.0' }),
77 'utf8',
78 );
79 fs.writeFileSync(path.join(root, 'index.js'), '// old', 'utf8');
80 fs.mkdirSync(path.join(root, 'src'), { recursive: true });
81 fs.writeFileSync(path.join(root, 'src', 'evolve.js'), '// old src', 'utf8');
82}
83
84function readPkgVersion(root) {
85 return JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8')).version;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected