mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
fix build issues
This commit is contained in:
@@ -7,7 +7,7 @@ import { replace } from 'esbuild-plugin-replace';
|
||||
import { mkdir, readFile } from 'fs/promises';
|
||||
import getPort, { portNumbers } from 'get-port';
|
||||
import { globby } from 'globby';
|
||||
import { dirname, join, posix, relative } from 'node:path';
|
||||
import { dirname, extname, join, posix, relative } from 'node:path';
|
||||
import process from 'node:process';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import ora from 'ora';
|
||||
|
||||
@@ -58,7 +58,7 @@ export async function generateDocs(options = {}) {
|
||||
return;
|
||||
}
|
||||
|
||||
spinner?.start('Writing the docs');
|
||||
spinner?.start?.('Writing the docs');
|
||||
|
||||
if (isIncremental) {
|
||||
} else {
|
||||
@@ -86,11 +86,11 @@ export async function generateDocs(options = {}) {
|
||||
await copy(getCdnDir(), join(getSiteDir(), 'dist'));
|
||||
}
|
||||
|
||||
spinner?.succeed(`Writing the docs ${chalk.gray(`(${output}`)})`);
|
||||
spinner?.succeed?.(`Writing the docs ${chalk.gray(`(${output}`)})`);
|
||||
} catch (error) {
|
||||
console.error('\n\n' + chalk.red(error) + '\n');
|
||||
|
||||
spinner?.fail(chalk.red(`Error while writing the docs.`));
|
||||
spinner?.fail?.(chalk.red(`Error while writing the docs.`));
|
||||
if (!isDeveloping) {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user