diff --git a/.gitignore b/.gitignore index 8e53ff72..30dddaec 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,4 @@ out/ /nbbuild/ /dist/ /nbdist/ -/.nb-gradle/ - -### VS Code ### -.vscode/ \ No newline at end of file +/.nb-gradle/ \ No newline at end of file diff --git a/ui-work/.vscode/extensions.json b/ui-work/.vscode/extensions.json new file mode 100644 index 00000000..0409dbe3 --- /dev/null +++ b/ui-work/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 + "recommendations": [ + "angular.ng-template" + ] +} diff --git a/ui-work/.vscode/launch.json b/ui-work/.vscode/launch.json new file mode 100644 index 00000000..925af837 --- /dev/null +++ b/ui-work/.vscode/launch.json @@ -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" + } + ] +} diff --git a/ui-work/.vscode/tasks.json b/ui-work/.vscode/tasks.json new file mode 100644 index 00000000..a298b5bd --- /dev/null +++ b/ui-work/.vscode/tasks.json @@ -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" + } + } + } + } + ] +} diff --git a/ui-work/docker/Dockerfile b/ui-work/docker/Dockerfile new file mode 100644 index 00000000..3be8e2d3 --- /dev/null +++ b/ui-work/docker/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:latest + +LABEL maintainer="Unit Contributors billbob.dong@gmail.com" + +COPY ./web/browser/** /usr/share/nginx/html diff --git a/ui-work/docker/web.json b/ui-work/docker/web.json new file mode 100644 index 00000000..1f7844e1 --- /dev/null +++ b/ui-work/docker/web.json @@ -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" + } + } + } + ] +}