Skip to content

Commit

Permalink
Migrate to vite (#135)
Browse files Browse the repository at this point in the history
* create a vite project

* copy files over

* fix move over to import.meta.env

* added moesif

* rename files

* Update vite.config.js

* env template for VITE

* update to use REACT_APP_ still so not impact docs

* add entrypoint sh to vite-front-end also

* Update entrypoint.sh

* migrate to vite

* remove react app

* Revert "remove react app"

This reverts commit 3d28e38.

* copy over favicon

* remove old create react app (deprecated)

* change name

* Update page title

* make sure npm start works too

* add engine

* update version

* update comment

* remove unneeded css
  • Loading branch information
xinghengwang authored Dec 23, 2024
1 parent 6e50b44 commit 3dee410
Show file tree
Hide file tree
Showing 81 changed files with 3,829 additions and 18,555 deletions.
41 changes: 21 additions & 20 deletions my-dev-portal/.gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
2 changes: 1 addition & 1 deletion my-dev-portal/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ npm install -g serve
# Start the server
echo "Starting the app at port 4000..."
echo ""
exec serve -p 4000 -s build
exec serve -p 4000 -s dist
38 changes: 38 additions & 0 deletions my-dev-portal/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
12 changes: 12 additions & 0 deletions my-dev-portal/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>My Dev Portal</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading

0 comments on commit 3dee410

Please sign in to comment.