This repo is begin developed based on Tokyo repo.
We have tried not to deviate too far from the Tokyo version, but we have adding unique Iwate features.
Install the following application to the environment for development.
Application name | Application version(Fill in only if specified) | Installation conditions |
---|---|---|
Node.js | 16.17.1 or higher | Required |
Visual Studio Code | If you use Visual Studio Code | |
yarn | When executing this program with yarn |
|
docker compose | When executing this program with docker compose |
|
Vagrant | When executing this program with Vagrant |
To use Visual Studio Code, install the following extension.
Extensions | Installation conditions |
---|---|
ESLint | Any |
Vetur | Any |
TSLint | Any |
Debugger for Chrome | Any |
Remote Development | When developing with Visual Studio Code and Remote Containers |
The command is executed in the working copy root directory.
# install dependencies
$ yarn install
After executing the following command, you can check the program under development by accessing http://localhost:3000 .
# serve with hot reload at localhost:3000
$ yarn dev
You can disable accessibility auditing, which would make your local server faster.
# serve with hot reload at localhost:3000
$ yarn dev-no-axe
Build the dependency again and run the program.
After executing the following command, you can check the program under development by accessing http://localhost:3000 .
# serve with hot reload at localhost:3000
$ docker-compose up --build
Stop the program and execute the following command.
$ docker-compose run --rm app yarn install
After executing the following command, you can check the program under development by accessing http://localhost:3000 .
# serve with hot reload at localhost:3000
$ vagrant up
If you select the “Open Folder in Container” root of this repository (as seen in the lower left Quick start: Try a dev container (external site)), the environment construction will start.
You can check the program under development by accessing http://localhost:3000 after building the environment.
- If you want to change the settings, modify
.devcontainer/devcontainer.json
. Please refer to devcontainer.json reference for more details. - The extension "ESLint" is only valid when executing Remote Container. Please add it to the
extensions
of.devcontainer/devcontainer.json
if necessary. - A detailed procedure can be found Managing extensions (external site).
- When rebuilding the development environment, please execute “Rebuild Container” which can be found at the lower left.
On the production environment, 'production'
is assigned to process.env.GENERATE_ENV
variable, on the other case 'development'
is assigned to the variable.
Please use the variable to detect which enviroinment is used at the runtime.
When the branch listed in the left column of the table below is updated, the branch and website will be updated automatically.
branch | A branch where HTML is built and updated | Website updated |
---|---|---|
master |
production |
The production site https://iwate.stopcovid19.jp/ |
staging |
gh-pages |
The staging site https://staging-covid19-iwate.netlify.app/ |
development |
dev-pages |
The development site https://dev-covid19-iwate.netlify.app/ |
Pull Request is allowed only for development
.
Please use the following naming rules for the branch when sending a Pull Request.
Types of changes | Naming rules for the branch |
---|---|
Feature implementation | feature/#{ISSUE_ID}-#{branch_title_name} |
Hotfix commit | hotfix/#{ISSUE_ID}-#{branch_title_name} |
Purpose | Branch | Confirmation URL | People who can make pull requests | Remarks |
---|---|---|---|---|
Development | development | All developers | base branch. Basically send a Pull Request here | |
Staging | staging | https://staging-covid19-iwate.netlify.app/ | Only administrators | For final confirmation before production. Non-admin pull requests are prohibited. |
Production | master | https://iwate.stopcovid19.jp/ | Only administrators | Pull Requests other than Administrators are prohibited |
Purpose | Branch | Confirmation URL | Remarks |
---|---|---|---|
Production site HTML | production | https://iwate.stopcovid19.jp/ | Location where statically built HTML is located |
Staging site HTML | gh-pages | https://staging-covid19-iwate.netlify.app/ | Where to find statically built HTML |