Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve IDX template configuration #91

Merged
merged 2 commits into from
Jan 21, 2025
Merged

Improve IDX template configuration #91

merged 2 commits into from
Jan 21, 2025

Conversation

Fryuni
Copy link
Member

@Fryuni Fryuni commented Jan 20, 2025

Try the template from this branch clicking here:

Open in IDX

Copy link

netlify bot commented Jan 20, 2025

Deploy Preview for astro-new ready!

Name Link
🔨 Latest commit 4f1f702
🔍 Latest deploy log https://app.netlify.com/sites/astro-new/deploys/678daf36960e520008fea1e6
😎 Deploy Preview https://deploy-preview-91--astro-new.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Fryuni Fryuni requested a review from delucis January 20, 2025 02:09
Copy link

@aFuzzyBear aFuzzyBear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the small issue with the onCreate behaviour, after the successful execution of idx environment. This is a great improvement, time to deployment was significantly faster as a result of these mods.

Great work @Fryuni

💚

.idx-templates/latest/dev.nix Show resolved Hide resolved
.idx-templates/latest/idx-template.nix Show resolved Hide resolved
.idx-templates/next/idx-template.nix Show resolved Hide resolved
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy moly it works! Left a couple of queries but thanks so much for debugging this @Fryuni 🎉

@@ -0,0 +1,4 @@
{
"recommendations": [],
"unwantedRecommendations": ["astro-build.astro-vscode"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m assuming this is related to the workaround in the dev.nix file? Or is it left over from some experiments? (On the surface it seems odd to mark the Astro extension as unwanted.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is! IDX will show the popup recommending to install the Astro extension while it is already being installed. This is to skip that popup. I'd add a comment, but can't have those in this file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, cool — thank you! This PR and your comment here will serve as our reference for future adventurers 🫡

'';
in ''
# Timeout for the whole bootstrap script
timeout -k 30s 30s ${script}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long do you think bootstrap will normally take? What’s the likelihood of it exceeding 30 seconds? Would be good to make sure we’re not too close to a regular run time, so we don’t kill a project just because bootstrapping took 32 seconds.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the time will be spent installing create-astro and creating the project. On Google's network that takes about 5s:
image

The remaining time spent on initialization is on Nix downloading and configuring Node and pnpm before calling bootstrap.

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @Fryuni! Very happy to get these buttons working again 🥳

@delucis delucis merged commit 76ba20f into main Jan 21, 2025
5 checks passed
@delucis delucis deleted the Fryuni-patch-1 branch January 21, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants