Skip to content

Commit

Permalink
✨ feat: 新增 VS Code 配置文件和 Docker 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
vnobo committed Jun 5, 2024
1 parent 69b02e6 commit 052d87a
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,4 @@ out/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
/.nb-gradle/
6 changes: 6 additions & 0 deletions ui-work/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": [
"angular.ng-template"
]
}
20 changes: 20 additions & 0 deletions ui-work/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
42 changes: 42 additions & 0 deletions ui-work/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
},
{
"type": "npm",
"script": "test",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
}
]
}
5 changes: 5 additions & 0 deletions ui-work/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM nginx:latest

LABEL maintainer="Unit Contributors [email protected]"

COPY ./web/browser/** /usr/share/nginx/html
35 changes: 35 additions & 0 deletions ui-work/docker/web.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"listeners": {
"*:80": {
"pass": "routes"
}
},
"routes": [
{
"match": {
"uri": "/api/*"
},
"action": {
"proxy": "http://127.0.0.1:8080"
}
},
{
"action": {
"share": "/www/web$uri",
"index": "index.html",
"types": [
"image/*",
"font/*",
"text/*"
],
"response_headers": {
"Cache-Control": "max-age=1209600"
},
"fallback": {
"share": "/www/web$uri",
"index": "index.html"
}
}
}
]
}

0 comments on commit 052d87a

Please sign in to comment.