(scripts)
| 15 | } |
| 16 | |
| 17 | function createTasks(scripts) { |
| 18 | const tasks = {}; |
| 19 | for (const name in scripts) { |
| 20 | const command = scripts[name]; |
| 21 | tasks[name] = command |
| 22 | .replace('--max-old-space-size=3072', '') |
| 23 | .replace('node ', 'deno run -A ') |
| 24 | .replaceAll('npm run ', 'deno task '); |
| 25 | } |
| 26 | return tasks; |
| 27 | } |
| 28 | |
| 29 | async function writeDenoJSON() { |
| 30 | const packageJSON = resolvePath('package.json'); |