| 1 | import { spawnSync } from 'node:child_process' |
| 2 | import { fileURLToPath } from 'node:url' |
| 3 | import { dirname, resolve } from 'node:path' |
| 4 | |
| 5 | const docsDirectory = resolve(dirname(fileURLToPath(import.meta.url)), '..') |
| 6 | const repositoryRoot = resolve(docsDirectory, '..') |
| 7 | |
| 8 | const result = spawnSync('doxygen', ['docs/Doxyfile'], { |
| 9 | cwd: repositoryRoot, |
| 10 | shell: process.platform === 'win32', |
| 11 | stdio: 'inherit' |
| 12 | }) |
| 13 | |
| 14 | if (result.error || result.status !== 0) { |
| 15 | console.error('Doxygen is required to build the complete website.') |
| 16 | if (result.error) { |
| 17 | console.error(result.error.message) |
| 18 | } |
| 19 | process.exit(1) |
| 20 | } |
| 21 | |
| 22 | process.exit(0) |