saltyshiomix/nextron

`.gitignore` in Root Directory Ignores Nested `app` Directories Unnecessarily

windsnow1025 opened this issue · 1 comments

When using npx create-nextron-app, the generated .gitignore file in the root directory is set up in a way that it ignores all directories named app throughout the project. This behavior can lead to unintended ignoring of important files in nested directories that are also named app, particularly in the renderer directory where Next.js projects commonly use an app directory for specific configurations or custom setups.

Expected Behavior

The .gitignore file should be configured to only ignore the app directory at the root of the project, not app directories that are nested within other directories.

Steps to Reproduce

  1. Run the command npx create-nextron-app MY_APP --example with-tailwindcss.
  2. Check the .gitignore file in the root directory.
  3. Notice that the entry for app will cause all directories named app at any level to be ignored, including potentially important ones in the renderer directory for Next.js projects.

Suggested Fix

Change the .gitignore entry from:

app

to:

/app

This change will ensure that only the root app directory is ignored, and not any app directory that might exist in subdirectories, such as those within the renderer directory used by Next.js projects.

This issue can lead to significant confusion and potential data loss if important files are inadvertently ignored by Git. A fix would help ensure that developers do not face issues with version control in their projects.

Thank you for looking into this issue!

Hi @windsnow1025 , sorry for late reply.

I think you are totally right!
If you have time, could you create PR? :)