()
| 85 | |
| 86 | |
| 87 | export async function buildIndex () { |
| 88 | |
| 89 | if ( !(await isExecutable( storkExecutablePath )) ) throw new Error( `Binary at ${ storkExecutablePath } is not executable.` ) |
| 90 | |
| 91 | // Check Stork version |
| 92 | // so we know our binary is working |
| 93 | const { stdout } = await execa( storkExecutablePath, [ |
| 94 | 'build', |
| 95 | |
| 96 | '--input', |
| 97 | storkTomlPath, |
| 98 | |
| 99 | '--output', |
| 100 | storkIndexPath |
| 101 | ]) |
| 102 | |
| 103 | console.log( 'Stork Build', stdout ) |
| 104 | if ( !stdout.includes( storkVersion ) ) throw new Error( 'Stork --version command failed.' ) |
| 105 | |
| 106 | return stdout |
| 107 | } |
no test coverage detected