MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / modifyJson

Function modifyJson

gulpfile.js:160–166  ·  view source on GitHub ↗
(jsonFile, cb)

Source from the content-addressed store, hash-verified

158});
159
160function modifyJson(jsonFile, cb) {
161 const json = fs.readFileSync(jsonFile).toString('utf-8');
162 const [key, value] = cb(json);
163 const edits = jsonc.modify(json, [key], value, {});
164 const updatedJson = jsonc.applyEdits(json, edits);
165 fs.writeFileSync(jsonFile, updatedJson);
166}
167
168gulp.task('updatePackageJsonForBundle', async () => {
169 // When building a web only VSIX, we need to remove the desktop entry point

Callers 1

gulpfile.jsFile · 0.85

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected