Skip to content

tekumara/jscedit

Repository files navigation

jscedit

Edit JSONC files eg: VS Code's settings.json.

JSONC files are JSON but can contain comments and trailing commas. They are a VS Code specific file format.

Uses microsoft/node-jsonc-parser which is more or less the jsonc parser within vscode.

Usage

Add/modify the setting to auto-save files after a delay:

npx jscedit settings.json '{"files.autoSave": "afterDelay"}'

Read/write from stdin/stdout:

printf '{ # comment\n"foo" : "bar", }' | npx jscedit - '{ "k1": "v1" }'
{ # comment
"foo": "bar",
"k1": "v1",
}

About

Edit JSONC files eg: VS Code's settings.json

Resources

License

Stars

Watchers

Forks

Packages

No packages published