(title, body)
| 17 | const outputDir = path.resolve(__dirname, '..', 'public', 'docs'); |
| 18 | |
| 19 | const template = (title, body) => `<!doctype html> |
| 20 | <html lang="en"> |
| 21 | <head> |
| 22 | <meta charset="UTF-8" /> |
| 23 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 24 | <title>${title}</title> |
| 25 | <link rel="stylesheet" href="docs.css" /> |
| 26 | </head> |
| 27 | <body> |
| 28 | ${body} |
| 29 | </body> |
| 30 | </html> |
| 31 | `; |
| 32 | |
| 33 | await mkdir(outputDir, { recursive: true }); |
| 34 | await copyFile(path.join(docsDir, 'docs.css'), path.join(outputDir, 'docs.css')); |