Skip to content

Commit

Permalink
add a basic server UI (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
yjpictures committed Oct 4, 2023
1 parent 26a715a commit c0bcefd
Show file tree
Hide file tree
Showing 25 changed files with 9,603 additions and 555 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ vars.NODE_VERSION }}

- name: Build Server UI
run: |
cd ./server-ui
npm i --omit=dev
npm run build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,8 @@ cython_debug/
# compose.yaml

# Swagger-UI
docs.yaml

# Node js
node_modules
/server-ui/public/main.js
/server/static/js/server-ui.js
20 changes: 13 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
"version": "0.2.0",
"configurations": [
{
"name": "Current File",
"type": "python",
"command": "npm start",
"name": "Run Server UI",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"cwd": "${workspaceFolder}/server"
"type": "node-terminal",
"cwd": "${workspaceFolder}/server-ui"
},
{
"name": "Run Server",
Expand All @@ -30,7 +28,15 @@
"80"
],
"jinja": true,
"justMyCode": true
"justMyCode": true,
"preLaunchTask": "Build Server UI"
}
],
"compounds": [
{
"name": "Server All",
"configurations": ["Run Server UI", "Run Server"],
"stopAll": true
}
]
}
14 changes: 14 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"path": "server-ui",
"group": "build",
"problemMatcher": [],
"label": "Build Server UI",
"detail": "webpack --config webpack.prod.js"
}
]
}
16 changes: 16 additions & 0 deletions server-ui/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
/*
a preset is a set of plugins used to support particular language features.
The two presets Babel uses by default: es2015, react
*/
"presets": [
"@babel/preset-env", //compiling ES2015+ syntax
"@babel/preset-react" //for react
],
/*
Babel's code transformations are enabled by applying plugins (or presets) to your configuration file.
*/
"plugins": [
"@babel/plugin-transform-runtime"
]
}
Loading

0 comments on commit c0bcefd

Please sign in to comment.