MCPcopy Create free account
hub / github.com/adobe/react-spectrum / writeJson

Function writeJson

packages/dev/mcp/s2/scripts/build-data.mjs:31–35  ·  view source on GitHub ↗
(file, data)

Source from the content-addressed store, hash-verified

29}
30
31function writeJson(file, data) {
32 ensureDir(path.dirname(file));
33 fs.writeFileSync(file, JSON.stringify(data, null, 2) + '\n', 'utf8');
34 console.log('Wrote', path.relative(REPO_ROOT, file));
35}
36
37async function importTsModule(tsFilePath) {
38 if (!fs.existsSync(tsFilePath)) {

Callers 1

mainFunction · 0.85

Calls 1

ensureDirFunction · 0.85

Tested by

no test coverage detected