As I work in a department that develops new services and products, I frequently have to set up new environments in my work. For that reason, I would like to summarize the steps I always take.
You can perform steps 1-3 of the following steps with a single command.
One of the React frameworks Gatsby (the official React page uses this framework as well) has a package called "starter" that allows you to build an environment with just one command. You can use the package to build an environment with a single command.
I have created a starter to build an environment in steps 1-3
We recommend using libraries such as React and Vue or Sass, but even if you don't, the following steps may be applicable.
- create a Git repository
- introduction of TypeScript
- introduction of ESLint Prettier
- perform various settings of VSCode and save the configuration file
- CI/CD Settings
Types can prevent useless errors and make completion useful.
It automates the rules and formatting of the code creation. We use it because we want to reduce the number of things that don't need to be done by humans. (You can set it for VSCode.) However, to ensure that the Linter runs, you can use husky to precommit the Linter to run it.
As mentioned earlier, you can set up Linter and others to run on
onSave and so on. As mentioned earlier, you can configure the settings to run onSave`, etc. If you save the settings to a workspace, you can share them with other developers.
By implementing a build/deploy mechanism that allows you to build/deploy at the same time you commit to GitHub, you can save yourself the trouble of doing that every time you develop.
- If you need to build without using libraries, etc., you need to take advantage of tools such as percel.