mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
6 lines
256 B
TypeScript
6 lines
256 B
TypeScript
const file = Deno.args[0].trim();
|
|
const importKey = Deno.args[1].trim();
|
|
const newValue = Deno.args[2].trim();
|
|
const json = JSON.parse(Deno.readTextFileSync(file));
|
|
json["imports"][importKey] = newValue;
|
|
Deno.writeTextFileSync(file, JSON.stringify(json));
|