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

upgrade serve and customize serve command #2805

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Conversation

Burnett2k
Copy link
Member

@Burnett2k Burnett2k commented Feb 13, 2024

Description

The current directions in docs/readme are a bit confusing. It says to use yarn “build” and “serve”, but that just opens a directory explorer which is kind of confusing.

Screenshot 2024-02-13 at 14 01 36

Additionally, the paths don’t actually work when you navigate around.

Screenshot 2024-02-13 at 14 02 55

To get docs to render you have to click through to 3 levels of folders to get to the right path and then it will render: http://localhost:3000/dist/open-source/victory/ ,

However, if you then try and click on /docs you’ll get a 404 because the content is served with /dist in the path, but the href is for http://localhost:3000/open-source/victory/about

To fix this, I added a custom yarn serve command which lets serve know to serve the /dist path. This fixes the path issues and allows the author to navigate around and test the site on their local machine properly.

Screenshot 2024-02-13 at 14 38 25 Screenshot 2024-02-13 at 14 38 46

The only outstanding issue now is that going to the default route still opens the file explorer. Since serve doesn’t seem to allow for setting a prefix, I updated the documentation to explain what URL the actual docs will be hosted at.

Finally, serve was a couple of major versions behind, so I upgraded it to latest.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

How Has This Been Tested?

  • Ran locally
  • Tested on preview deployment
  • Verified serve isn't used in production deployment(s), so it will have no effect there

Copy link

changeset-bot bot commented Feb 13, 2024

⚠️ No Changeset found

Latest commit: 5a63b62

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Feb 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
victory ✅ Ready (Inspect) Visit Preview Feb 13, 2024 10:37pm

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.

2 participants