-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathx.dsync.ts
More file actions
21 lines (16 loc) · 779 Bytes
/
x.dsync.ts
File metadata and controls
21 lines (16 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const npm = JSON.parse(Deno.readTextFileSync("./package.json"))
const jsr = JSON.parse(Deno.readTextFileSync("./deno.json"))
if (npm.dependencies)
for (const name in npm.dependencies)
if (name.startsWith("@hazae41"))
jsr.imports[name] = `jsr:${name}@${npm.dependencies[name]}`
if (npm.devDependencies)
for (const name in npm.devDependencies)
if (name.startsWith("@hazae41"))
jsr.imports[name] = `jsr:${name}@${npm.devDependencies[name]}`
if (npm.peerDependencies)
for (const name in npm.peerDependencies)
if (name.startsWith("@hazae41"))
jsr.imports[name] = `jsr:${name}@${npm.peerDependencies[name]}`
jsr.imports = Object.fromEntries(Object.entries(jsr.imports).sort())
Deno.writeTextFileSync("./deno.json", JSON.stringify(jsr, null, 2))