SAFE-template icon indicating copy to clipboard operation
SAFE-template copied to clipboard

Add exclude files to settings.json

Open isaacabraham opened this issue 1 year ago • 2 comments

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

isaacabraham avatar Jun 17 '24 11:06 isaacabraham

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.

Larocceau avatar Jun 21 '24 13:06 Larocceau

@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

jwthomson avatar Jun 28 '24 12:06 jwthomson

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 avatar Jul 19 '24 09:07 isaacabraham

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

isaacabraham avatar Jul 19 '24 09:07 isaacabraham

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)

mattgallagher92 avatar Jul 26 '24 10:07 mattgallagher92

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

isaacabraham avatar Aug 02 '24 15:08 isaacabraham

Discussed internally, agreed to avoid nesting altogether, but go ahead with exclusions. Can consider nesting in future.

mattgallagher92 avatar Aug 16 '24 13:08 mattgallagher92