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

Add exclude files to settings.json #617

Closed
isaacabraham opened this issue Jun 17, 2024 · 7 comments
Closed

Add exclude files to settings.json #617

isaacabraham opened this issue Jun 17, 2024 · 7 comments

Comments

@isaacabraham
Copy link
Member

We should consider excluding folders from VS Code. This can be included in the settings.json file:

    "files.exclude": {
        ".vs": true,
        ".npmrc": true,
        ".paket": true,
        "**/bin": true,
        "**/obj": true,
        "**/output": true,
        "deploy": true,
        "node_modules": true,
        "paket-files": true,
        ".fantomasignore": true,
        "src/Client/postcss.config.js": true,
        "src/Client/vite.config.mts": true,
        "src/Client/tailwind.config.js": true,
        "src/Client/index.css": true,
        "src/Client/index.html": true,
    }

This is just an idea - the list above might be too much though. Certainly the first half of the list would be good to add - the second half might be more controversial ;-)

Before:

image

After:

image

@Larocceau
Copy link
Contributor

I agree on excluding the first part of the list, second part not so much. I feel like those files tend to be a source of issues that can be fairly hard to pinpoint because they are in config files. For people not as familiar with the template hiding part of the config can make troubleshooting more challenging that necessary.

@jwthomson
Copy link
Contributor

@isaacabraham what are your thoughts on Maxime's preferred solution to this problem - nesting config under a single file using this extension:
https://github.com/antfu/vscode-file-nesting-config

@isaacabraham
Copy link
Member Author

I'm open to that. The other issue with my solution is that it doesn't just hide it from the explorer, it hides it from CTRL + P file navigation as well.

@isaacabraham
Copy link
Member Author

I'm just not sure where we would put / group all these files / folders under.

@mattgallagher92
Copy link
Member

I don't use VS Code, so won't make the change, but my opinion is that we should hide build assets/output and nest infrequently-used files that affect the behaviour of the build and/or tools. Hiding config files would make things more magical and harder to debug.

We should exclude these files:

  • .vs (not relevant to VS Code users)
  • .paket
  • **/bin
  • **/obj
  • **/output
  • deploy
  • node_modules
  • paket-files

And we should nest these files:

  • .npmrc (under package.json)
  • .fantomasignore (under .gitignore???)
  • src/Client/postcss.config.js (under src/Client/vite.config.mts)
  • src/Client/tailwind.config.js (under src/Client/vite.config.mts)
  • src/Client/index.css (under src/Client/vite.config.mts)
  • src/Client/index.html (under src/Client/vite.config.mts)

@isaacabraham
Copy link
Member Author

Sounds good to me. I think we could also do .idea (which is the Rider folder). I'll do this as a PR.

@mattgallagher92
Copy link
Member

Discussed internally, agreed to avoid nesting altogether, but go ahead with exclusions. Can consider nesting 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

4 participants