()
| 8 | } |
| 9 | |
| 10 | async function main() { |
| 11 | const runTime = `export const runtime = 'edge';\n\n`; |
| 12 | |
| 13 | getPath('docs').forEach(async path => { |
| 14 | const file = fs.readFileSync(path, 'utf-8'); |
| 15 | |
| 16 | if (!file.includes(runTime)) { |
| 17 | await fs.promises.writeFile(path, runTime.concat(file)); |
| 18 | } |
| 19 | }); |
| 20 | |
| 21 | getPath('learn').forEach(async path => { |
| 22 | const file = fs.readFileSync(path, 'utf-8'); |
| 23 | if (!file.includes(runTime)) { |
| 24 | await fs.promises.writeFile(path, runTime.concat(file)); |
| 25 | } |
| 26 | }); |
| 27 | } |
| 28 | |
| 29 | main(); |