Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed May 17, 2024
1 parent f5c8fee commit b41cec6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/astro/src/core/build/plugins/plugin-content.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createHash } from 'node:crypto';
import fsMod from 'node:fs';
import { fileURLToPath } from 'node:url';
import glob from 'fast-glob';
import pLimit from 'p-limit';
import { type Plugin as VitePlugin, normalizePath } from 'vite';
import type { AstroConfig } from '../../../@types/astro.js';
Expand All @@ -27,7 +28,6 @@ import { copyFiles } from '../static-build.js';
import type { StaticBuildOptions } from '../types.js';
import { encodeName } from '../util.js';
import { extendManualChunks } from './util.js';
import glob from 'fast-glob';

const CONTENT_CACHE_DIR = './' + CONTENT_PATH;
const CONTENT_MANIFEST_FILE = './manifest.json';
Expand Down Expand Up @@ -461,12 +461,12 @@ export async function copyContentToCache(opts: StaticBuildOptions) {
// we can clean them out of the dist folder
let files: string[] = [];
await Promise.all([
glob(`**/*.{mjs,json}`,{
cwd: fileURLToPath(cacheTmp)
}).then(f => files.push(...f.map(file => CONTENT_PATH + file))),
glob(`**/*.{mjs,json}`,{
glob(`**/*.{mjs,json}`, {
cwd: fileURLToPath(cacheTmp),
}).then((f) => files.push(...f.map((file) => CONTENT_PATH + file))),
glob(`**/*.{mjs,json}`, {
cwd: fileURLToPath(new URL('./' + CHUNKS_PATH, config.outDir)),
}).then(f => files.push(...f.map(file => CHUNKS_PATH + file))),
}).then((f) => files.push(...f.map((file) => CHUNKS_PATH + file))),
]);

// Remove the tmp folder that's no longer needed.
Expand Down
3 changes: 2 additions & 1 deletion packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ async function cleanServerOutput(
) {
const out = getOutDirWithinCwd(opts.settings.config.outDir);
// The SSR output chunks for Astro are all .mjs files
const files = ssrOutputChunkNames.filter((f) => f.endsWith('.mjs'))
const files = ssrOutputChunkNames
.filter((f) => f.endsWith('.mjs'))
.concat(contentFileNames ?? []);
if (internals.manifestFileName) {
files.push(internals.manifestFileName);
Expand Down

0 comments on commit b41cec6

Please sign in to comment.