Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored and astrobot-houston committed Jan 9, 2023
1 parent f8f4d49 commit cb5dbcc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 1 addition & 3 deletions packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ 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';
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';
Expand Down
6 changes: 3 additions & 3 deletions packages/astro/src/core/fs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ export function removeEmptyDirs(root: URL): void {
const dir = fileURLToPath(root);
if (!fs.statSync(dir).isDirectory()) return;
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);
}

Expand Down
5 changes: 4 additions & 1 deletion packages/integrations/image/src/build/ssg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cb5dbcc

Please sign in to comment.