Skip to content

Commit

Permalink
Replaced react-scripts with vite (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzgrewal authored Sep 15, 2023
1 parent 1eefbe2 commit c7bd38b
Show file tree
Hide file tree
Showing 16 changed files with 8,257 additions and 12,509 deletions.
10 changes: 5 additions & 5 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
REACT_APP_MAIN_VERSION = v1.0.0
REACT_APP_USER_POOLS_ID= ca-central-1_FxagSNQa7
REACT_APP_USER_POOLS_WEB_CLIENT_ID= 43hjhdf5dvi17opb0jgucfpvm7
REACT_APP_CHES_FROM_EMAIL = [email protected]
REACT_APP_CHES_ADMIN_EMAIL = [email protected]
VITE_MAIN_VERSION = v1.0.0
VITE_USER_POOLS_ID= ca-central-1_FxagSNQa7
VITE_USER_POOLS_WEB_CLIENT_ID= 43hjhdf5dvi17opb0jgucfpvm7
VITE_CHES_FROM_EMAIL = [email protected]
VITE_CHES_ADMIN_EMAIL = [email protected]
41 changes: 41 additions & 0 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"parser": 'vue-eslint-parser',
// "ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"react"
],
"rules": {
},
"settings": {
"react": {
"version": "detect"
}
}
}
2 changes: 1 addition & 1 deletion frontend/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

handle /env.js {
header Content-Type "text/javascript"
respond `window.config = {"REACT_APP_USER_POOLS_ID":"{$REACT_APP_USER_POOLS_ID}","REACT_APP_USER_POOLS_WEB_CLIENT_ID":"{$REACT_APP_USER_POOLS_WEB_CLIENT_ID}","REACT_APP_REDIRECT_SIGN_OUT":"{$REACT_APP_REDIRECT_SIGN_OUT}","REACT_APP_ZONE":"{$REACT_APP_ZONE}","REACT_APP_CHES_FROM_EMAIL":"{$REACT_APP_CHES_FROM_EMAIL}","REACT_APP_CHES_ADMIN_EMAIL":"{$REACT_APP_CHES_ADMIN_EMAIL}"};`
respond `window.config = {"VITE_USER_POOLS_ID":"{$VITE_USER_POOLS_ID}","VITE_USER_POOLS_WEB_CLIENT_ID":"{$VITE_USER_POOLS_WEB_CLIENT_ID}","VITE_REDIRECT_SIGN_OUT":"{$VITE_REDIRECT_SIGN_OUT}","VITE_ZONE":"{$VITE_ZONE}","VITE_CHES_FROM_EMAIL":"{$VITE_CHES_FROM_EMAIL}","VITE_CHES_ADMIN_EMAIL":"{$VITE_CHES_ADMIN_EMAIL}"};`
}

handle_path /* {
Expand Down
22 changes: 22 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" />
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<title>RESULTS EXAM</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-zYPOMqeu1DAVkHiLqWBUTcbYfZ8osu1Nd6Z89ify25QV9guujx43ITvfi12/QExE" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-Y4oOpwW3duJdCWv5ly8SCFYWqFDsfob/3GkgExXKV4idmbt98QcxXYs9UoXAB7BZ" crossorigin="anonymous"></script>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
Loading

0 comments on commit c7bd38b

Please sign in to comment.