From cb8400eea30a2ec9146291821bd69470bf459a98 Mon Sep 17 00:00:00 2001 From: Jur van den Berg Date: Tue, 19 Apr 2022 22:07:43 +0200 Subject: [PATCH] Cleanup frontend --- .drone.yml | 4 +- Makefile | 11 + cmd/server/main.go | 15 - frontend/.gitignore | 2 +- frontend/README.md | 31 +- frontend/package-lock.json | 4378 ++++++++++++++++++++++++++ frontend/package.json | 38 +- frontend/public/favicon.ico | Bin 4286 -> 0 bytes frontend/public/favicon.svg | 3 + frontend/src/assets/logo.png | Bin 6849 -> 0 bytes frontend/src/components/Nav.vue | 11 +- frontend/src/components/Renderer.vue | 1 + frontend/src/icons/Logo.vue | 48 + frontend/src/lib/covergen.ts | 13 + frontend/src/lib/randomlabel.ts | 16 +- frontend/tsconfig.json | 8 +- frontend/yarn.lock | 3710 ---------------------- 17 files changed, 4526 insertions(+), 3763 deletions(-) delete mode 100644 cmd/server/main.go create mode 100644 frontend/package-lock.json delete mode 100644 frontend/public/favicon.ico create mode 100644 frontend/public/favicon.svg delete mode 100644 frontend/src/assets/logo.png create mode 100644 frontend/src/icons/Logo.vue delete mode 100644 frontend/yarn.lock diff --git a/.drone.yml b/.drone.yml index 69a4199..aab0928 100644 --- a/.drone.yml +++ b/.drone.yml @@ -62,9 +62,9 @@ steps: path: /wasm commands: - cd frontend - - yarn install + - npm install - "cp /wasm/* public/" - - yarn build + - npm run build - name: upload image: plugins/s3 settings: diff --git a/Makefile b/Makefile index 9cd91e5..9a981d6 100644 --- a/Makefile +++ b/Makefile @@ -16,3 +16,14 @@ build-cross-clis: ## Builds the CLIs for all supported platforms rm -rf ./dist && mkdir ./dist GOOS=linux GOARCH=amd64 go build -o dist/covergen.linux-amd64 ./cmd/covergen GOOS=darwin GOARCH=amd64 go build -o dist/covergen.darwin-amd64 ./cmd/covergen + +.PHONY: wasm-frontend +wasm-frontend: wasm + cp covergen.wasm frontend/public/covergen.wasm + +.PHONY: clis-frontend +clis-frontend: build-cross-clis + cp -r dist/ frontend/public/ + +.PHONY: prepare-frontend +prepare-frontend: wasm-frontend clis-frontend ### Prepares all main-repo requirements for the frontend \ No newline at end of file diff --git a/cmd/server/main.go b/cmd/server/main.go deleted file mode 100644 index d4cf10c..0000000 --- a/cmd/server/main.go +++ /dev/null @@ -1,15 +0,0 @@ -package main - -import ( - "fmt" - "net/http" -) - -// Super simple development webserver -func main() { - err := http.ListenAndServe(":9090", http.FileServer(http.Dir("assets"))) - if err != nil { - fmt.Println("Failed to start server", err) - return - } -} diff --git a/frontend/.gitignore b/frontend/.gitignore index 4197962..3aef114 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -4,5 +4,5 @@ dist dist-ssr *.local -.yarn/install-state.gz public/*.wasm +public/dist diff --git a/frontend/README.md b/frontend/README.md index f5342b7..1966093 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,11 +1,30 @@ -# Vue 3 + Typescript + Vite +# Covergen Frontend -This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 ` +