Skip to content

Commit

Permalink
chore: minor changes to generate pdfs integration
Browse files Browse the repository at this point in the history
  • Loading branch information
sahithyandev committed Nov 3, 2024
1 parent 47c2267 commit c63e7fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/generate-pdfs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function outputFilename(filePath: string) {
);
}

async function waitForServer(url: string, timeout = 1000, interval = 500) {
async function waitForServer(url: string, timeout = 5000, interval = 500) {
const start = Date.now();

while (Date.now() - start < timeout) {
Expand All @@ -39,7 +39,7 @@ async function waitForServer(url: string, timeout = 1000, interval = 500) {

export default function generatePdfsIntegration(): AstroIntegration {
let browser: Browser;
let devServer: ChildProcessWithoutNullStreams;
const devServer: ChildProcessWithoutNullStreams = spawn("astro", ["dev"]);
return {
name: "generate-pdfs",
hooks: {
Expand Down Expand Up @@ -115,7 +115,6 @@ export default function generatePdfsIntegration(): AstroIntegration {
}),
),
);
devServer = spawn("astro", ["dev"]);
await waitForServer("http://localhost:4321/");
logger.info("dev server started");
},
Expand Down

0 comments on commit c63e7fb

Please sign in to comment.