Configure various dev tools
This pull request pre-configures various dev tools to allow an easier onboarding for potential new developers.
In particular:
-
The
.vscodeand.ideadirectories are unexcluded, as they're not supposed to be excluded in first place- The
.ideadirectory is left to be managed by IDE itself via the.idea/.gitignorefile in it
- The
-
The
.vscodedirectory is pre-populated with settings to aid development in VSCode:-
A run configuration to launch Phanpy on port 8080 and to open an instance of a Chromium-based browser in debug mode on it as soon as the server is done launching:
-
A recommendation for the
github.vscode-github-actionsextension that adds features to work on GitHub Actions files, such as proper syntax highlighting: -
If the user has File Nesting enabled (it is not by default), its settings are extended to group together
*.tsx,*.jsx,*.ts,*.js,*.module.cssand*.cssfiles with the same name:
-
The
src/localesandnode_modulesdirectories are hidden by default from the file explorer and excluded from search, as they're not meant to be edited by hand
-
-
The
.devcontainerdirectory is created with a basic but functional configuration to develop Phanpy in a development container, such as the ones provided by GitHub Codespaces -
The
.ideadirectory is pre-populated too with settings to aid development in Jetbrains' IDEs:-
Project name has been set to "Phanpy" instead of whatever the current working directory is called
-
Code style settings are setup to be overridden by the project, which copies the Prettier features built-in in the IDE
- Further code linting can be later performed before-commit by the external Prettier plugin
-
Basic module structure
-
A «Scope» is setup to mark localization files managed by Crowdin with a red colour, denoting that they should not be edited
-
-
The port for the development server has been changed from
5173to8080; while both are well-known for Vite development, only the latter is officially registered with the IANA for web development -
Metadata is added to
package.jsonto prevent accidental publishing ("private": true) and to have additional information if needed -
The
prettier-pr.ymlGitHub Action is extended to allow it to automatically prettify files, instead of just checking them
Since this is a lot of opinionated stuff, if you're not comfortable with merging parts of it, I'd recommend you to cherry-pick the commits you think might be interesting, or to tell me which parts you like so that I can cherry-pick for you!
- Personally not a fan of editor-specific configs. There are too many editors out there (in the past, in the present, and will be many more in the future) with too many configs 🙈
- Prettier action is nice, tho' now I would prefer it to show warnings first (thus blocking the PR merge) instead of auto-fixing them — good for telling future contributors that they need this set up on their editors instead of relying on CI to auto-fix for them.
- Not sure if accidental publishing is common, but I don't think that should be our concern here(?) 🤔, re: package.json changes. I'm also not sure if all the metadata would be useful in other context as I prefer that file to be as minimalistic as possible.