chore: Update package.json description for clarity

This commit is contained in:
Mauro Balades 2024-07-06 21:17:06 +02:00
parent 1f72a1630d
commit 7cfe4aa88d
15 changed files with 184 additions and 136 deletions

View file

@ -112,7 +112,13 @@ async function downloadFirefoxSource(version: string) {
return filename
}
export async function downloadInternals({ version, force }: { version: string, force?: boolean }) {
export async function downloadInternals({
version,
force,
}: {
version: string
force?: boolean
}) {
// Provide a legible error if there is no version specified
if (!version) {
log.error(
@ -127,7 +133,9 @@ export async function downloadInternals({ version, force }: { version: string, f
}
// If the engine directory is empty, we should delete it.
const engineIsEmpty = existsSync(ENGINE_DIR) && await readdir(ENGINE_DIR).then((files) => files.length === 0)
const engineIsEmpty =
existsSync(ENGINE_DIR) &&
(await readdir(ENGINE_DIR).then((files) => files.length === 0))
if (engineIsEmpty) {
log.info("'engine/' is empty, it...")
rmSync(ENGINE_DIR, { recursive: true })
@ -150,4 +158,4 @@ export async function downloadInternals({ version, force }: { version: string, f
config.version.version = version
writeFileSync(configPath, JSON.stringify(config, undefined, 2))
}
}