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

provides the url when starting #46

Closed
wants to merge 1 commit into from
Closed

provides the url when starting #46

wants to merge 1 commit into from

Conversation

yanick
Copy link
Contributor

@yanick yanick commented Nov 21, 2021

The fix is probably not exactly at the right place, but yeah, I just spend waaaay too much time wondering why svench was hanging on startup, before realizing that it was not, and was waiting for me at :4242. Duh!

The fix is probably not exactly at the right place, but yeah, I just spend waaaay too much time wondering why svench was hanging on startup, before realizing that it was not, and was waiting for me at :4242. Duh!
@vercel
Copy link

vercel bot commented Nov 21, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/rixodev/svench-docs/3rNVY388AtASX7dh6PAAAw74zFxF
✅ Preview: https://svench-docs-git-fork-yanick-patch-2-rixodev.vercel.app

@rixo
Copy link
Owner

rixo commented Dec 10, 2021

Oh yeah, I've seen the welcome message had been removed from Vite's createServer... I have back ported it into Svench.

Can you tell me if this is working for you with the branch in this PR.

... and it would be lovely to look and see if you see any outstanding issue or if it feels release ready to you!

@yanick
Copy link
Contributor Author

yanick commented Dec 11, 2021

Looks like it's doing what it's supposed to do!

As for a look over, there are two things which could totally be "me" problems, but:

  1. looks like all the knobs disappeared?
  2. how does one add a static directory to the svench env for assets and stuff?

@rixo
Copy link
Owner

rixo commented Jan 29, 2022

@yanick

  1. looks like all the knobs disappeared?

Err... Shouldn't. I can't reproduce, can you confirm?

For example, this is a fresh deploy of the very latest version of Svench, I can see the knobs: https://svench-docs-2zulfy7xm-rixodev.vercel.app/_/Usage/knobs?view=defining+and+using+a+knob&fs=0&c&o=0&p&cv=%40none&bg=%23fff

  1. how does one add a static directory to the svench env for assets and stuff?

Well... Svench should just reuse your existing config, so the same assets that are working in your app should be working in Svench with the same URLs. Theoretically.

For Vite, the default would be the public directory of your project.

Kit (as much as it is supported in Svench...) changes this default to 'static' currently. I've added some changes to the kit branch of this repo to try and detect this automatically.

Feel free to open an issue (or reach to me on Discord) if you want to discuss this more in depth.

I'm closing the PR since a similar fix has been applied in main.

@rixo rixo closed this Jan 29, 2022
@yanick
Copy link
Contributor Author

yanick commented Jan 30, 2022

  1. looks like all the knobs disappeared?

Err... Shouldn't. I can't reproduce, can you confirm?

I think I found it. Turns out you can resize the knobs section to nothing, and there is no visual clue that it's there and can be re-stretched back into view. I must have resized it a few months ago and forgot it. I was looking for any type of hot key to make the section appear/disappear, but didn't think about hovering at the very bottom of the window. 🤦

So, yeah, maybe a hotkey to reset the sections to the default size might help the next clueless user that will follow my footsteps. ^.^

  1. how does one add a static directory to the svench env for assets and stuff?

Well... Svench should just reuse your existing config, so the same assets that are working in your app should be working in Svench with the same URLs. Theoretically.

For Vite, the default would be the public directory of your project.

Kit (as much as it is supported in Svench...) changes this default to 'static' currently. I've added some changes to the kit branch of this repo to try and detect this automatically.

👍 I'll try to come up with a documentation patch that covers this. It's one of those instances that when it works automatically, it's magic, but when it doesn't, it's useful to know what the system is trying to do so that one can determine what is going on.

Thanks!

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.

None yet

2 participants