[ci] format

This commit is contained in:
natemoo-re 2023-01-09 16:03:47 +00:00 committed by fredkbot
parent f8f4d49aba
commit cb5dbcc51f
3 changed files with 8 additions and 7 deletions

View file

@ -2,7 +2,6 @@ import * as eslexer from 'es-module-lexer';
import glob from 'fast-glob';
import fs from 'fs';
import { bgGreen, bgMagenta, black, dim } from 'kleur/colors';
import path from 'path';
import { fileURLToPath } from 'url';
import * as vite from 'vite';
import { astroBundleDelayedAssetPlugin } from '../../content/index.js';
@ -10,9 +9,8 @@ import {
BuildInternals,
createBuildInternals,
eachPrerenderedPageData,
isHoistedScript,
} from '../../core/build/internal.js';
import { emptyDir, removeDir, removeEmptyDirs } from '../../core/fs/index.js';
import { emptyDir, removeEmptyDirs } from '../../core/fs/index.js';
import { appendForwardSlash, prependForwardSlash } from '../../core/path.js';
import { isModeServerWithNoAdapter } from '../../core/util.js';
import { runHookBuildSetup } from '../../integrations/index.js';

View file

@ -17,10 +17,10 @@ export function removeEmptyDirs(root: URL): void {
let files = fs.readdirSync(dir);
if (files.length > 0) {
files.map(file => {
files.map((file) => {
const url = new URL(`./${file}`, appendForwardSlash(root.toString()));
removeEmptyDirs(url);
})
});
files = fs.readdirSync(dir);
}

View file

@ -172,7 +172,10 @@ export async function ssgBuild({
let outputFileURL: URL;
if (isRemoteImage(src)) {
outputFileURL = new URL(path.join(`./${config.build.assets}`, path.basename(filename)), outDir);
outputFileURL = new URL(
path.join(`./${config.build.assets}`, path.basename(filename)),
outDir
);
outputFile = fileURLToPath(outputFileURL);
} else {
outputFileURL = new URL(path.join(`./${config.build.assets}`, filename), outDir);