├── .gitignore ├── README.md ├── app.go ├── app.manifest ├── app.wxs ├── go.mod ├── go.sum ├── guark-build.yaml ├── guark-bundle.yaml ├── guark.yaml ├── lib ├── config.go ├── funcs │ └── hello_world.go └── hooks │ ├── created.go │ └── mounted.go ├── meta ├── darwin │ └── info.plist ├── linux │ ├── Makefile │ └── _id_.desktop └── windows │ └── .gitkeep ├── resources └── windows │ ├── WebView2Loader.dll │ └── webview.dll ├── statics └── icon.png └── ui ├── .gitignore ├── babel.config.js ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ └── icon.png ├── components │ └── HelloWorld.vue ├── main.js └── store │ └── index.js ├── vue.config.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | guark.syso 3 | bundler.yaml 4 | ui/node_modules/ 5 | ui/guark.lock 6 | lib/embed.go 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Guark Vue Template 2 | Guark Vue.js app template. 3 | 4 | ![Guark Vue Template](https://i.imgur.com/RhU6bh7.png) 5 | 6 | ## Install 7 | 8 | Create new empty directory and cd to it, and run: 9 | ```bash 10 | guark init --template vue --mod github.com/username/appname 11 | ``` 12 | 13 | ## Run dev app. 14 | 15 | Run dev app with vue hot reload: 16 | ```bash 17 | guark run 18 | ``` 19 | 20 | ## Build 21 | 22 | ```bash 23 | guark build 24 | ``` 25 | 26 | ## Bundle 27 | 28 | ```bash 29 | guark bundle 30 | ``` 31 | -------------------------------------------------------------------------------- /app.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/guark/guark/app" 5 | "github.com/guark/guark/log" 6 | "github.com/guark/guark/engine" 7 | "{{AppPkg}}/lib" 8 | ) 9 | 10 | func main() { 11 | 12 | a := &app.App{ 13 | Log: log.New("app"), 14 | Hooks: lib.Hooks, 15 | Funcs: lib.Funcs, 16 | Embed: lib.Embeds, 17 | Plugins: lib.Plugins, 18 | } 19 | 20 | if err := a.Use(engine.New(a)); err != nil { 21 | a.Log.Fatal(err) 22 | } 23 | 24 | defer a.Quit() 25 | 26 | if err := a.Run(); err != nil { 27 | a.Log.Fatal(err) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ .Name }} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | true 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /app.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 37 | 38 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | {{if ne .Engine "chrome" }} 55 | 56 | 57 | {{end}} 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 79 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module {{AppPkg}} 2 | 3 | go 1.18 4 | 5 | require ( 6 | github.com/guark/guark v0.1.3 7 | github.com/guark/plugins v0.0.0-20220731230528-dd3f3b63fc78 8 | ) 9 | 10 | replace github.com/sqweek/dialog => github.com/sqweek/dialog v0.0.0-20220504154117-be45b268883a 11 | 12 | require ( 13 | github.com/TheTitanrain/w32 v0.0.0-20200114052255-2654d97dbd3d // indirect 14 | github.com/adrg/xdg v0.4.0 // indirect 15 | github.com/atotto/clipboard v0.1.4 // indirect 16 | github.com/gen2brain/beeep v0.0.0-20220518085355-d7852edf42fc // indirect 17 | github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4 // indirect 18 | github.com/godbus/dbus/v5 v5.1.0 // indirect 19 | github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect 20 | github.com/pkg/errors v0.9.1 // indirect 21 | github.com/sirupsen/logrus v1.9.0 // indirect 22 | github.com/sqweek/dialog v0.0.0-20220729164723-0e168706f490 // indirect 23 | github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af // indirect 24 | github.com/webview/webview v0.0.0-20220729131735-25e7f41b8bbf // indirect 25 | github.com/zserge/lorca v0.1.10 // indirect 26 | golang.org/x/net v0.0.0-20220728211354-c7608f3a8462 // indirect 27 | golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect 28 | gopkg.in/yaml.v2 v2.4.0 // indirect 29 | ) 30 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/TheTitanrain/w32 v0.0.0-20180517000239-4f5cfb03fabf/go.mod h1:peYoMncQljjNS6tZwI9WVyQB3qZS6u79/N3mBOcnd3I= 2 | github.com/TheTitanrain/w32 v0.0.0-20200114052255-2654d97dbd3d h1:2xp1BQbqcDDaikHnASWpVZRjibOxu7y9LhAv04whugI= 3 | github.com/TheTitanrain/w32 v0.0.0-20200114052255-2654d97dbd3d/go.mod h1:peYoMncQljjNS6tZwI9WVyQB3qZS6u79/N3mBOcnd3I= 4 | github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= 5 | github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= 6 | github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= 7 | github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= 8 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 9 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 10 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 11 | github.com/gen2brain/beeep v0.0.0-20220518085355-d7852edf42fc h1:6ZZLxG+lB+Qbg+chtzAEeetwqjlPnY0BXbhL3lQWYOg= 12 | github.com/gen2brain/beeep v0.0.0-20220518085355-d7852edf42fc/go.mod h1:/WeFVhhxMOGypVKS0w8DUJxUBbHypnWkUVnW7p5c9Pw= 13 | github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4 h1:qZNfIGkIANxGv/OqtnntR4DfOY2+BgwR60cAcu/i3SE= 14 | github.com/go-toast/toast v0.0.0-20190211030409-01e6764cf0a4/go.mod h1:kW3HQ4UdaAyrUCSSDR4xUzBKW6O2iA4uHhk7AtyYp10= 15 | github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= 16 | github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 17 | github.com/guark/guark v0.1.3 h1:TwzPrzUXZNAOQLFJ8F4/Km4l5wthTzBae9xHyA+Pxy8= 18 | github.com/guark/guark v0.1.3/go.mod h1:EtEbCBdIEikfnnPSCBzLDJ8quv3HBQI/ewiLaKeEQGY= 19 | github.com/guark/plugins v0.0.0-20220731230528-dd3f3b63fc78 h1:qhi2ET2EnD4SHSamtMwxdjkeNb28mhDcckDTq0PVbS0= 20 | github.com/guark/plugins v0.0.0-20220731230528-dd3f3b63fc78/go.mod h1:LjRUxExqE0m6PxxYY75ZUCximID8T9rCiat//KQVLfc= 21 | github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= 22 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= 23 | github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= 24 | github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U= 25 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 26 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 27 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 28 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 29 | github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= 30 | github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 31 | github.com/sqweek/dialog v0.0.0-20220729164723-0e168706f490 h1:TwsocBjqDja1HRRB2xaydzXWSfYLX9ZNPRBY0Xxeqlk= 32 | github.com/sqweek/dialog v0.0.0-20220729164723-0e168706f490/go.mod h1:/qNPSY91qTz/8TgHEMioAUc6q7+3SOybeKczHMXFcXw= 33 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 34 | github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= 35 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 36 | github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af h1:6yITBqGTE2lEeTPG04SN9W+iWHCRyHqlVYILiSXziwk= 37 | github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af/go.mod h1:4F09kP5F+am0jAwlQLddpoMDM+iewkxxt6nxUQ5nq5o= 38 | github.com/webview/webview v0.0.0-20220729131735-25e7f41b8bbf h1:xGxamNQiDXDlPzCumBdLWflZDwruHkwJ1iORcpJmblk= 39 | github.com/webview/webview v0.0.0-20220729131735-25e7f41b8bbf/go.mod h1:rpXAuuHgyEJb6kXcXldlkOjU6y4x+YcASKKXJNUhh0Y= 40 | github.com/zserge/lorca v0.1.10 h1:f/xBJ3D3ipcVRCcvN8XqZnpoKcOXV8I4vwqlFyw7ruc= 41 | github.com/zserge/lorca v0.1.10/go.mod h1:bVmnIbIRlOcoV285KIRSe4bUABKi7R7384Ycuum6e4A= 42 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 43 | golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 44 | golang.org/x/net v0.0.0-20220728211354-c7608f3a8462 h1:UreQrH7DbFXSi9ZFox6FNT3WBooWmdANpU+IfkT1T4I= 45 | golang.org/x/net v0.0.0-20220728211354-c7608f3a8462/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= 46 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 47 | golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 48 | golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 49 | golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 50 | golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80= 51 | golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 52 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 53 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 54 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= 55 | gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= 56 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 57 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= 58 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 59 | -------------------------------------------------------------------------------- /guark-build.yaml: -------------------------------------------------------------------------------- 1 | # Guark build config file. 2 | 3 | setup: 4 | - cmd: yarn install 5 | dir: ui 6 | - cmd: go mod download 7 | - cmd: go mod tidy 8 | - cmd: go mod verify 9 | 10 | linux: 11 | ldflags: "" 12 | 13 | darwin: 14 | ldflags: "" 15 | 16 | windows: 17 | cc: /usr/bin/x86_64-w64-mingw32-gcc 18 | cxx: /usr/bin/x86_64-w64-mingw32-g++ 19 | ldflags: "-H windowsgui" 20 | windres: /usr/bin/x86_64-w64-mingw32-windres 21 | -------------------------------------------------------------------------------- /guark-bundle.yaml: -------------------------------------------------------------------------------- 1 | id: {{ .ID }} 2 | name: {{ .Name }} 3 | version: {{ .Version }} 4 | publisher: Example LTD 5 | description: Your app description here. 6 | bundles: 7 | - type: msi 8 | source: dist/windows 9 | output: dist/{{ .ID }}.msi 10 | options: 11 | guid: d8cb43ce-0225-429c-850e-77debcb0fe99 # put your own windows UpgradeCode UUID here. 12 | template: app.wxs 13 | #bindir: "c:\\Program Files (x86)\\Wix Toolset v3.11\\bin\\" 14 | -------------------------------------------------------------------------------- /guark.yaml: -------------------------------------------------------------------------------- 1 | guark: v1 2 | 3 | # App id must be unique. 4 | id: GuarkDemo 5 | 6 | # Your App name. 7 | name: Guark Demo 8 | 9 | # App version. 10 | version: v1.0.0 11 | 12 | # App license slug name. 13 | license: MIT 14 | 15 | # App log level. Values: debug, info, warn, error, fatal, panic 16 | logLevel: debug 17 | 18 | # App engine name. Values: webview, chrome, hybrid 19 | engineName: chrome 20 | 21 | # App engine config and options. 22 | engineConfig: 23 | # min: Width and height are minimum bounds 24 | # max: Width and height are maximum bounds 25 | # fix: Window size can not be changed by a user 26 | window_hint: "min" 27 | window_width: 1024 28 | window_height: 700 29 | -------------------------------------------------------------------------------- /lib/config.go: -------------------------------------------------------------------------------- 1 | package lib 2 | 3 | import ( 4 | "github.com/guark/guark/app" 5 | "github.com/guark/plugins/clipboard" 6 | "github.com/guark/plugins/dialog" 7 | "github.com/guark/plugins/notify" 8 | "{{AppPkg}}/lib/funcs" 9 | "{{AppPkg}}/lib/hooks" 10 | ) 11 | 12 | // Exposed functions to guark Javascript api. 13 | var Funcs = app.Funcs{ 14 | "hello_world": funcs.HelloWorld, 15 | } 16 | 17 | // App hooks. 18 | var Hooks = app.Hooks{ 19 | "created": hooks.Created, 20 | "mounted": hooks.Mounted, 21 | } 22 | 23 | // App plugins. 24 | var Plugins = app.Plugins{ 25 | "dialog": &dialog.Plugin{}, 26 | "notify": ¬ify.Plugin{}, 27 | "clipboard": &clipboard.Plugin{}, 28 | } 29 | -------------------------------------------------------------------------------- /lib/funcs/hello_world.go: -------------------------------------------------------------------------------- 1 | package funcs 2 | 3 | import ( 4 | "github.com/guark/guark/app" 5 | ) 6 | 7 | func HelloWorld(c app.Context) (interface{}, error) { 8 | 9 | c.App.Log.Info("HelloWorld called") 10 | 11 | return nil, nil 12 | } 13 | -------------------------------------------------------------------------------- /lib/hooks/created.go: -------------------------------------------------------------------------------- 1 | package hooks 2 | 3 | import ( 4 | "github.com/guark/guark/app" 5 | ) 6 | 7 | // App created hook. 8 | func Created(a *app.App) error { 9 | 10 | a.Log.Info("---- HOOK: App created! ----") 11 | 12 | return nil 13 | } 14 | -------------------------------------------------------------------------------- /lib/hooks/mounted.go: -------------------------------------------------------------------------------- 1 | package hooks 2 | 3 | import ( 4 | "github.com/guark/guark/app" 5 | ) 6 | 7 | // App mounted hook. 8 | func Mounted(a *app.App) error { 9 | 10 | a.Log.Info("---- HOOK: App mounted! ----") 11 | 12 | return nil 13 | } 14 | -------------------------------------------------------------------------------- /meta/darwin/info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDisplayName 6 | {{ .Name }} 7 | CFBundleExecutable 8 | {{ .ID }} 9 | CFBundleIconFile 10 | {{ .ID }}.icns 11 | CFBundleIdentifier 12 | {{ .ID }} 13 | CFBundlePackageType 14 | APPL 15 | CFBundleShortVersionString 16 | {{ .Version }} 17 | CFBundleVersion 18 | {{ .Version }} 19 | LSApplicationCategoryType 20 | public.app-category.developer-tools 21 | LSMinimumSystemVersion 22 | 10.10.0 23 | NSAppTransportSecurity 24 | 25 | NSAllowsArbitraryLoads 26 | 27 | NSAllowsLocalNetworking 28 | 29 | NSExceptionDomains 30 | 31 | 127.0.0.1 32 | 33 | NSIncludesSubdomains 34 | 35 | NSTemporaryExceptionAllowsInsecureHTTPLoads 36 | 37 | NSTemporaryExceptionAllowsInsecureHTTPSLoads 38 | 39 | NSTemporaryExceptionMinimumTLSVersion 40 | 1.0 41 | NSTemporaryExceptionRequiresForwardSecrecy 42 | 43 | 44 | localhost 45 | 46 | NSIncludesSubdomains 47 | 48 | NSTemporaryExceptionAllowsInsecureHTTPLoads 49 | 50 | NSTemporaryExceptionAllowsInsecureHTTPSLoads 51 | 52 | NSTemporaryExceptionMinimumTLSVersion 53 | 1.0 54 | NSTemporaryExceptionRequiresForwardSecrecy 55 | 56 | 57 | 58 | 59 | NSHighResolutionCapable 60 | 61 | NSHumanReadableCopyright 62 | Copyright 2020 Your Guark App 63 | NSPrincipalClass 64 | AtomApplication 65 | NSQuitAlwaysKeepsWindows 66 | 67 | NSRequiresAquaSystemAppearance 68 | 69 | NSSupportsAutomaticGraphicsSwitching 70 | 71 | 72 | -------------------------------------------------------------------------------- /meta/linux/Makefile: -------------------------------------------------------------------------------- 1 | # to install the app run: sudo make install 2 | 3 | install: 4 | install -C {{ .ID }} /usr/local/bin/{{ .ID }} 5 | install -C {{ .ID }}.desktop /usr/local/share/applications/{{ .ID }}.desktop 6 | mkdir -p /usr/share/{{ .ID }} 7 | cp -r statics/ /usr/share/{{ .ID }} 8 | find /usr/share/{{ .ID }}/ -type d -exec chmod 755 {} \; 9 | find /usr/share/{{ .ID }}/ -type f -exec chmod 644 {} \; 10 | chmod +x /usr/local/bin/{{ .ID }} 11 | -------------------------------------------------------------------------------- /meta/linux/_id_.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Type=Application 4 | Terminal=false 5 | Name={{ .Name }} 6 | Exec=/usr/local/bin/{{ .ID }} %u 7 | Icon=/usr/share/{{ .ID }}/statics/icon.png 8 | Version={{ .Version }} 9 | StartupWMClass={{ .ID }} 10 | -------------------------------------------------------------------------------- /meta/windows/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guark/vue/e634baa4d22a6fe3ab8e0da7447bd14579ee7c46/meta/windows/.gitkeep -------------------------------------------------------------------------------- /resources/windows/WebView2Loader.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guark/vue/e634baa4d22a6fe3ab8e0da7447bd14579ee7c46/resources/windows/WebView2Loader.dll -------------------------------------------------------------------------------- /resources/windows/webview.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guark/vue/e634baa4d22a6fe3ab8e0da7447bd14579ee7c46/resources/windows/webview.dll -------------------------------------------------------------------------------- /statics/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guark/vue/e634baa4d22a6fe3ab8e0da7447bd14579ee7c46/statics/icon.png -------------------------------------------------------------------------------- /ui/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | # Editor directories and files 16 | .idea 17 | .vscode 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /ui/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | ['@vue/app', { 4 | polyfills: [ 5 | 'es.promise', 6 | 'es.symbol' 7 | ] 8 | }] 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-ui", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "core-js": "^3.6.5", 11 | "guark": "^0.1.0", 12 | "vue": "^2.6.11", 13 | "vuex": "^3.4.0" 14 | }, 15 | "devDependencies": { 16 | "@vue/cli-plugin-babel": "~4.4.0", 17 | "@vue/cli-plugin-vuex": "~4.4.0", 18 | "@vue/cli-service": "~4.4.0", 19 | "sass": "^1.26.5", 20 | "sass-loader": "^8.0.2", 21 | "vue-template-compiler": "^2.6.11" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guark/vue/e634baa4d22a6fe3ab8e0da7447bd14579ee7c46/ui/public/favicon.ico -------------------------------------------------------------------------------- /ui/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Guark Demo 9 | 14 | 15 | 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /ui/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 68 | 69 | -------------------------------------------------------------------------------- /ui/src/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guark/vue/e634baa4d22a6fe3ab8e0da7447bd14579ee7c46/ui/src/assets/icon.png -------------------------------------------------------------------------------- /ui/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 85 | 86 | 119 | -------------------------------------------------------------------------------- /ui/src/main.js: -------------------------------------------------------------------------------- 1 | import g from 'guark' 2 | import Vue from 'vue' 3 | import App from './App.vue' 4 | import store from './store' 5 | 6 | Vue.config.productionTip = false 7 | 8 | new Vue({ 9 | store, 10 | render: h => h(App), 11 | created: () => g.hook("created"), 12 | mounted: () => g.hook("mounted"), 13 | }).$mount('#app') -------------------------------------------------------------------------------- /ui/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | Vue.use(Vuex) 5 | 6 | export default new Vuex.Store({ 7 | state: { 8 | }, 9 | mutations: { 10 | }, 11 | actions: { 12 | }, 13 | modules: { 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /ui/vue.config.js: -------------------------------------------------------------------------------- 1 | const { useGuarkLockFile, checkBeforeBuild } = require('guark/build') 2 | 3 | checkBeforeBuild() 4 | 5 | module.exports = 6 | { 7 | outputDir: process.env.GUARK_BUILD_DIR, 8 | productionSourceMap: process.env.NODE_ENV == 'production' ? false : true, 9 | configureWebpack: 10 | { 11 | devServer: 12 | { 13 | // After server started you should call useGuarkLockFile. 14 | after: (app, server, compiler) => compiler.hooks.done.tap("Guark", useGuarkLockFile) 15 | }, 16 | }, 17 | } 18 | --------------------------------------------------------------------------------