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

Update Node.gitignore to include VitePress #4543

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

NdagiStanley
Copy link

Include VitePress

Reasons for making this change:

I noticed that VuePress is included in the current gitignore. VuePress has been succeeded by VitePress. This change includes files to be ignored in a VitePress project.

Include VitePress
@wirecat
Copy link
Collaborator

wirecat commented Dec 6, 2024

@NdagiStanley could you provide some links to documentation supporting the change?
I just want to keep a good record that supports the change.
Thank you! 🙇

@caipeter888
Copy link

caipeter888 commented Dec 14, 2024

@wirecat The modification reference can be found in the official VitePress documentation here: https://vitepress.dev/guide/getting-started#file-structure

It mentions:

TIP

By default, VitePress stores its dev server cache in .vitepress/cache, and the production build output in .vitepress/dist. If using Git, you should add them to your .gitignore file. These locations can also be configured.

@caipeter888
Copy link

@NdagiStanley Please note that the VitePress temp and cache directory is .vitepress/cache, not .temp or .cache. It differs from the VuePress v2.x directories.

@NdagiStanley
Copy link
Author

@NdagiStanley Please note that the VitePress temp and cache directory is .vitepress/cache, not .temp or .cache. It differs from the VuePress v2.x directories.

You are right @caipeter888. I've updated the PR.

@caipeter888
Copy link

However, the .vitepress folder might not always appear in the root directory of the repository; it could be in a subdirectory like docs/.vitepress. I’m not sure if using .vitepress/cache and .vitepress/dist in the .gitignore file would correctly ignore the files in such cases. We might need to adjust the paths to handle different directory structures.

@NdagiStanley
Copy link
Author

NdagiStanley commented Dec 22, 2024

Good point @caipeter888
According to the .gitignore docs on pattern format, I should include **/.

That said, judging by how vuepress was handled, I believe the reasoning is to handle the default case and leave it to the developer who restructures the folders, to update the pattern.

I'll make the edit anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants