mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
c22a07db13
commit
8bb28b48ee
2 changed files with 7 additions and 7 deletions
|
@ -62,17 +62,18 @@ export default function createIntegration(args?: Options): AstroIntegration {
|
|||
allowOverwrite: true,
|
||||
format: 'esm',
|
||||
bundle: true,
|
||||
external: [ "@astrojs/markdown-remark"]
|
||||
external: ['@astrojs/markdown-remark'],
|
||||
});
|
||||
|
||||
// Remove chunks, if they exist. Since we have bundled via esbuild these chunks are trash.
|
||||
try {
|
||||
const chunkFileNames = _vite?.build?.rollupOptions?.output?.chunkFileNames ?? 'chunks/chunk.[hash].mjs';
|
||||
const chunkFileNames =
|
||||
_vite?.build?.rollupOptions?.output?.chunkFileNames ?? 'chunks/chunk.[hash].mjs';
|
||||
const chunkPath = npath.dirname(chunkFileNames);
|
||||
const chunksDirUrl = new URL(chunkPath + '/', _buildConfig.server);
|
||||
await fs.promises.rm(chunksDirUrl, { recursive: true, force: true });
|
||||
} catch {}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -26,13 +26,13 @@ export async function startModFromSubprocess(baseUrl) {
|
|||
let proc = Deno.run({
|
||||
cmd: ['deno', 'run', '--allow-env', '--allow-net', fromFileUrl(entryUrl)],
|
||||
cwd: fromFileUrl(baseUrl),
|
||||
stderr: 'piped'
|
||||
stderr: 'piped',
|
||||
});
|
||||
const stderr = readableStreamFromReader(proc.stderr);
|
||||
const dec = new TextDecoder();
|
||||
for await(let bytes of stderr) {
|
||||
for await (let bytes of stderr) {
|
||||
let msg = dec.decode(bytes);
|
||||
if(msg.includes(`Server running`)) {
|
||||
if (msg.includes(`Server running`)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,6 @@ export async function runBuildAndStartApp(fixturePath, cb) {
|
|||
await close();
|
||||
}
|
||||
|
||||
|
||||
export async function runBuildAndStartAppFromSubprocess(fixturePath, cb) {
|
||||
const url = new URL(fixturePath, dir);
|
||||
const close = await runBuild(fixturePath);
|
||||
|
|
Loading…
Reference in a new issue