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

Documentation on generated files #392

Open
bmulholland opened this issue Nov 28, 2023 · 8 comments
Open

Documentation on generated files #392

bmulholland opened this issue Nov 28, 2023 · 8 comments

Comments

@bmulholland
Copy link

bmulholland commented Nov 28, 2023

I've run create-vue and have a bunch of files now. Thanks! It's a good start. But I don't understand all these files. Is there a docs site that explains the result of running create-vue? I tried looking at the official Vue docs, in this repo, etc, but no luck. Please let me know if I've missed anything.

  1. There are several tsconfig variants... why? What are each for? What do they do? Why? When I change the config, which should I change, and when?
  2. There's an env.d.ts. What's that for?
  3. What's the intended difference between public/ and src/assets/ dirs? What should I put in which?

I have to understand all of them because I'm converting an existing project over from Nuxt. I'm trying to fold all these files into my existing repo. But, to do that well, I have to understand each first.

As an example of what I'm looking for, Nuxt has a Directory Structure section in the sidebar here that explains all the files in a Nuxt 3 project.

@bmulholland
Copy link
Author

In general, a docs site for "here's what you get and how to use it" would be extremely helpful. I recognize this is a scaffold, but still the goal is a gentle onramp to Vue and IMHO it's yet not as good as vue-cli at doing that.

@cexbrayat
Copy link
Member

Hi @bmulholland

Thanks for your feedback

Did you check https://vuejs.org/guide/typescript/overview.html#project-setup ?

There is a specific issue logged to improve the documentation of the TS config files, see #265

But as you noted, this project is just a scaffolding for Vite, so you should be able to find more specific documentation on https://vitejs.dev/ and the other tools you chose when scaffolding.

@bmulholland
Copy link
Author

bmulholland commented Nov 30, 2023

I did check that page, yes. Glad there's a specific Issue about the tsconfig ones, those are indeed confusing.

There's more to it, though. As I note, the env.d.ts isn't clear. There's also main.ts and App.vue, and it's not immediately obvious to me what each does. Understanding the purpose of each would help me use the resulting files much better.

Beyond that: what choices does the scaffolding use by default, and why? What other choices might we consider?

And going even further, ideally there would be some info on suggested best practices, so I don't start coding and dig myself into a hole right away. The scaffolding is pretty unopinionated, but that doesn't mean it can't have some :)

I will figure this all out manually, including by going to vite's docs. These thoughts are in the spirit of helping future people figure it out faster than I did. So take it as product feedback from a user, nothing more. I guess in that sense it's not an "Issue," but Discussions aren't open on this repo

@cexbrayat
Copy link
Member

Sure, thanks for the feedback 👍

I'm just wondering if this is the best place to discuss/log this, or if that should be an issue on docs repo https://github.com/vuejs/docs (because there is no docs in this repo as you've seen)

@bmulholland
Copy link
Author

bmulholland commented Nov 30, 2023

I wonder that too :)

Happy to file it there if you know that's the right place. Given that doesn't have docs for this, it's not obvious the feedback belongs there either?

@bmulholland
Copy link
Author

bmulholland commented Nov 30, 2023

Another question I just had, storing it here so it's in one place for now at least: If I want to change the page title for each route, what system does that? Which docs do I look at? Vite? Vue? Vue Router? Something else?

@cexbrayat
Copy link
Member

For the title of the page, you can change the default one in index.html. If you want a dynamic title depending on the URL, you'll have to use the router.

@bmulholland
Copy link
Author

Yeah, I figured that out, but it was way too hard. Even vue-router barely documents how to do dynamic titles. ChatGPT is what gave me a real solution, and I'm still not sure if that's the best practice approach? Anyway, just recording all the questions that someone starting up, hopefully these can get answered in an accessible place for others in future.

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

No branches or pull requests

2 participants