Skip to content

Commit

Permalink
Replace CreateReactApp with Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerwins committed Jun 24, 2024
1 parent 7c44e7c commit 88046db
Show file tree
Hide file tree
Showing 35 changed files with 6,340 additions and 29,145 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Common Environment Variables
REACT_APP_JS_SDK_VERSION=0.4.23
VITE_JS_SDK_VERSION=0.4.23
6 changes: 3 additions & 3 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Development Environment Variables
REACT_APP_SERVICE_URL=https://yorkie.dev
REACT_APP_API_ADDR=http://localhost:8080
REACT_APP_SITE_URL=https://localhost:3000/dashboard/
VITE_SERVICE_URL=https://yorkie.dev
VITE_API_ADDR=http://localhost:8080
VITE_SITE_URL=https://localhost:3000/dashboard/
6 changes: 3 additions & 3 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Production Environment Variables
REACT_APP_SERVICE_URL=https://yorkie.dev
REACT_APP_API_ADDR=https://api.yorkie.dev
REACT_APP_SITE_URL=https://yorkie.dev/dashboard/
VITE_SERVICE_URL=https://yorkie.dev
VITE_API_ADDR=https://api.yorkie.dev
VITE_SITE_URL=https://yorkie.dev/dashboard/
6 changes: 3 additions & 3 deletions .github/workflows/ghpages-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: GitHub Page Publish
on:
push:
branches: [ main ]
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
Expand All @@ -16,12 +16,12 @@ jobs:
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Install and Build 🔧
- name: Install and Build 🔧
run: |
npm install
npm run build
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: build
folder: dist
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# production
/build
/dist

# misc
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Updating and Deploying Dashboard

1. Update `version` in [package.json](https://github.com/yorkie-team/dashboard/blob/main/package.json#L36).
2. Update `REACT_APP_JS_SDK_VERSION` in [.env](https://github.com/yorkie-team/dashboard/blob/main/.env#L2).
2. Update `VITE_JS_SDK_VERSION` in [.env](https://github.com/yorkie-team/dashboard/blob/main/.env#L2).
3. Update version of Yorkie image in [docker/docker-compose.yml](https://github.com/yorkie-team/dashboard/blob/main/docker/docker-compose.yml#L26).
4. Check that there are no errors when running the dashboard, and review the sample code for any necessary modifications.
5. Create Pull Request and merge it into main.
17 changes: 9 additions & 8 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon-16x16.png" />
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon-32x32.png" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon-512x512.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="apple-touch-icon" href="/favicon-512x512.png" />
<link rel="manifest" href="/manifest.json" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<meta name="theme-color" content="#000000" />
<title>Dashboard · Yorkie</title>
Expand All @@ -15,16 +15,16 @@
content="Yorkie Dashboard is an administrative tool that allows user to manage projects and documents."
/>
<meta property="og:type" content="website" />
<meta property="og:image" content="%PUBLIC_URL%/og.png" />
<meta property="og:url" content="%REACT_APP_SITE_URL%" />
<meta property="og:image" content="/og.png" />
<meta property="og:url" content="%VITE_SITE_URL%" />
<meta property="og:title" content="Yorkie Dashboard" />
<meta
property="og:description"
content="Yorkie Dashboard is an administrative tool that allows user to manage projects and documents."
/>
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@team_yorkie" />
<meta property="twitter:image" content="%PUBLIC_URL%/og.png" />
<meta property="twitter:image" content="/og.png" />
<meta property="twitter:title" content="Yorkie Dashboard" />
<meta
property="twitter:description"
Expand Down Expand Up @@ -71,5 +71,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 88046db

Please sign in to comment.