Skip to content

Commit

Permalink
Merge pull request #29 from nzin/ui
Browse files Browse the repository at this point in the history
setup VueJS UI code
  • Loading branch information
nzin-alayacare authored Aug 28, 2023
2 parents 5bd45d4 + 08d1f71 commit d88ea59
Show file tree
Hide file tree
Showing 36 changed files with 18,798 additions and 197 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
######################################
# Prepare npm_builder
######################################
FROM node:16 as npm_builder
WORKDIR /app
ADD . .
RUN make build_ui

######################################
# Prepare go_builder
######################################
Expand All @@ -14,6 +22,7 @@ RUN mkdir /app
WORKDIR /app

COPY --from=go_builder /app/goliac ./goliac
COPY --from=npm_builder /app/browser/goliac-ui/dist ./browser/goliac-ui/dist

RUN useradd --uid 1000 --gid 0 goliac && \
chown goliac:root /app && \
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@

all: deps gen build
all: deps gen build build_ui

rebuild: gen build

build:
@GO111MODULE=on go build -o goliac ./cmd/goliac

build_ui:
@echo "Building Goliac UI ..."
@cd ./browser/goliac-ui/; npm install --legacy-peer-deps && npm run build

run_ui:
@cd ./browser/goliac-ui/; npm run serve

test: deps verifiers
@GO111MODULE=on go test -race -covermode=atomic -coverprofile=coverage.txt ./internal/...
@go tool cover -html coverage.txt -o cover.html
Expand Down
24 changes: 24 additions & 0 deletions browser/goliac-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# goliac-ui

## Project setup
```
yarn install
```

### Compiles and hot-reloads for development
```
yarn serve
```

### Compiles and minifies for production
```
yarn build
```

### Lints and fixes files
```
yarn lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
5 changes: 5 additions & 0 deletions browser/goliac-ui/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
19 changes: 19 additions & 0 deletions browser/goliac-ui/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}
Loading

0 comments on commit d88ea59

Please sign in to comment.