Skip to content

Commit

Permalink
feat(bundler): update to be compatible with new Vue binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
hbollon committed Jul 18, 2021
1 parent 57e3fc1 commit 924e15f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/bundler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ jobs:
env:
GO111MODULE: "on"
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Download Go modules
run: go mod download
Expand All @@ -27,9 +32,15 @@ jobs:
go get github.com/asticode/go-astilectron-bundler/...
go install github.com/asticode/go-astilectron-bundler/astilectron-bundler
- name: Download npm dependencies and build Vue project
run: |
cd resources/static/vue-igopher
npm install
npm run build
- name: Bundle
run: |
cd cmd/igopher/gui-bundler
cd ../../../cmd/igopher/gui-bundler
mv bind.go bind.go.tmp
astilectron-bundler -c bundler.json
Expand Down
2 changes: 1 addition & 1 deletion cmd/igopher/gui-bundler/bundler.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"icon_path_darwin": "resources/favicon.icns",
"icon_path_linux": "resources/favicon.png",
"icon_path_windows": "resources/favicon.ico",
"resources_path": "resources/static",
"resources_path": "resources/static/vue-igopher/dist",
"environments": [{
"arch": "amd64",
"os": "darwin"
Expand Down
4 changes: 2 additions & 2 deletions cmd/igopher/gui-bundler/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ func main() {
return nil
},
RestoreAssets: RestoreAssets,
ResourcesPath: "resources/static",
ResourcesPath: "resources/static/vue-igopher/dist",
Windows: []*bootstrap.Window{{
Homepage: "dm_automation.html",
Homepage: "index.html",
Options: &astilectron.WindowOptions{
BackgroundColor: astikit.StrPtr("#333"),
Center: astikit.BoolPtr(true),
Expand Down
2 changes: 1 addition & 1 deletion cmd/igopher/gui/gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func main() {
}

// New window
if w, err = a.NewWindow("./resources/static/vue-igopher/dist/index.html", &astilectron.WindowOptions{
if w, err = a.NewWindow("./resources/static/vue-igopher/dist/app/index.html", &astilectron.WindowOptions{
Center: astikit.BoolPtr(true),
Width: astikit.IntPtr(1400),
Height: astikit.IntPtr(1000),
Expand Down
2 changes: 1 addition & 1 deletion resources/static/vue-igopher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "./",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build": "vue-cli-service build --dest dist/app",
"lint": "vue-cli-service lint"
},
"dependencies": {
Expand Down

0 comments on commit 924e15f

Please sign in to comment.