[PLEASE TRANSLATE ME]
Install the following application to the environment for development.
Application name | Application version(Fill in only if specified) | Installation conditions |
---|---|---|
Node.js | 18.14.2 หรือสูงกว่า | 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.
[/PLEASE TRANSLATE ME]
[PLEASE TRANSLATE ME]
[/PLEASE TRANSLATE ME]
# install dependencies
$ yarn install
[PLEASE TRANSLATE ME]
After executing the following command, you can check the program under development by accessing http://localhost:3000 .
[/PLEASE TRANSLATE ME]
# serve with hot reload at localhost:3000
$ yarn dev
[PLEASE TRANSLATE ME]
You can disable accessibility auditing, which would make your local server faster.
[/PLEASE TRANSLATE ME]
# serve with hot reload at localhost:3000
$ yarn dev-no-axe
[PLEASE TRANSLATE ME]
[/PLEASE TRANSLATE ME]
[PLEASE TRANSLATE ME]
Build the dependency again and run the program.
[/PLEASE TRANSLATE ME]
[PLEASE TRANSLATE ME]
After executing the following command, you can check the program under development by accessing http://localhost:3000 .
[/PLEASE TRANSLATE ME]
# serve with hot reload at localhost:3000
$ docker compose up --build
[PLEASE TRANSLATE ME]
[/PLEASE TRANSLATE ME]
[PLEASE TRANSLATE ME]
Stop the program and execute the following command.
[/PLEASE TRANSLATE ME]
$ docker compose run --rm app yarn install
[PLEASE TRANSLATE ME]
After executing the following command, you can check the program under development by accessing http://localhost:3000 .
[/PLEASE TRANSLATE ME]
# serve with hot reload at localhost:3000
$ vagrant up
[PLEASE TRANSLATE ME]
[/PLEASE TRANSLATE ME]
คลิกที่มุมซ้ายล่างของ Visual Studio Code Quick start: Try a dev container (เว็บไซต์ภายนอก)) จากนั้นเลือก "Open Folder in Container" แล้วเลือก root ของ repository นี้ สภาพแวดล้อมสำหรับการพัฒนาจะถูกสร้างขึ้น
[PLEASE TRANSLATE ME]
You can check the program under development by accessing http://localhost:3000 after building the environment.
[/PLEASE TRANSLATE ME]
- ถ้าต้องการเปลี่ยนการตั้งค่า ให้แก้แฟ้ม
.devcontainer/devcontainer.json
ดู devcontainer.json reference (เว็บไซต์ภายนอก) สำหรับรายละเอียด - เมื่อเรียกใช้งาน Remote Container จะมีการแนะนำส่วนขยาย "ESLint" โปรดพิจารณาเพิ่มลงใน
extensions
ของ.devcontainer/devcontainer.json
ตามความจำเป็น โปรดดู Managing extensions (เว็บไซต์ภายนอก) สำหรับคำแนะนำรายละเอียด - หากต้องการสร้างสภาพแวดล้อมการพัฒนาขึ้นใหม่ ให้ดำเนินการ "Rebuild Container" โดยคลิกที่มุมซ้ายล่าง
[PLEASE TRANSLATE ME]
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.
[/PLEASE TRANSLATE ME]
[PLEASE TRANSLATE ME]
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://stopcovid19.metro.tokyo.lg.jp/ |
staging |
gh-pages |
The staging site https://stopcovid19-tokyo-staging.web.app/ |
development |
dev-pages |
The development site https://stopcovid19-tokyo-development.web.app/ |
[/PLEASE TRANSLATE ME]
pull request เปิดรับได้ที่ development
เท่านั้น
โปรดตั้งชื่อ branch ดังนี้
[PLEASE TRANSLATE ME]
Types of changes | Naming rules for the branch |
---|---|
การสร้างฟีเจอร์ | feature/#{ISSUE_ID}-#{branch_title_name} |
Hotfix commit | hotfix/#{ISSUE_ID}-#{branch_title_name} |
[/PLEASE TRANSLATE ME]
จุดประสงค์ | branch | URL | People who can make pull requests | หมายเหตุ |
---|---|---|---|---|
Development | development | https://stopcovid19-tokyo-development.web.app/ | All developers | branch หลัก ใช้ในการรับ pull request |
Staging | staging | https://stopcovid19-tokyo-staging.web.app/ | Only administrators | ใช้สำหรับ staging ทดสอบตัวปรับปรุง ก่อน deploy ลง production - ห้ามสร้าง pull request ยกเว้นจาก admin เอง |
Production | master | https://stopcovid19.metro.tokyo.lg.jp/ | Only administrators | ห้ามสร้าง pull request ยกเว้นจาก admin เอง |
จุดประสงค์ | branch | URL | หมายเหตุ |
---|---|---|---|
Production site HTML | production | https://stopcovid19.metro.tokyo.lg.jp/ | HTML สำหรับ production |
Staging site HTML | gh-pages | https://stopcovid19-tokyo-staging.web.app/ | HTML สำหรับ staging |
สำหรับ OGP working directory | deploy / new_ogp | None | สำหรับปรับปรุง OGP |