From 479eef689d50fae95bade250d90950569eb9b69c Mon Sep 17 00:00:00 2001 From: KiddoV Date: Tue, 3 Oct 2023 12:58:35 -0500 Subject: [PATCH] some updates... --- .gitignore | 24 ++++++++++++++++++++++++ README.md | 30 +++++++++++++++++++----------- scripts/build-macos-arm.sh | 9 --------- scripts/build-macos-intel.sh | 9 --------- scripts/build-macos.sh | 9 --------- scripts/build-windows.sh | 9 --------- scripts/build.sh | 9 --------- scripts/install-wails-cli.sh | 14 -------------- 8 files changed, 43 insertions(+), 70 deletions(-) create mode 100644 .gitignore delete mode 100644 scripts/build-macos-arm.sh delete mode 100644 scripts/build-macos-intel.sh delete mode 100644 scripts/build-macos.sh delete mode 100644 scripts/build-windows.sh delete mode 100644 scripts/build.sh delete mode 100644 scripts/install-wails-cli.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b1e61c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# After editing .gitignore to match the ignored files, you can do < git ls-files -ci --exclude-standard > +# to see the files that are included in the exclude lists; you can then do +# +# @ Linux/MacOS: < git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached > +# @ Windows (PowerShell): < git ls-files -ci --exclude-standard | % { git rm --cached "$_" } > +# @ Windows (cmd.exe): < for /F "tokens=*" %a in ('git ls-files -ci --exclude-standard') do @git rm --cached "%a" > +# ...to re-init the ignore list + +# Wails directories +build/bin +frontend/wailsjs + +# Wails junk files +.syso + +# Go files +go.sum + +# IDEs +.idea +.vscode + +# System enviroment variables +env \ No newline at end of file diff --git a/README.md b/README.md index 941fd82..65aec0f 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,26 @@ -# README - ## About -This is a super simple wails template with basic web components (HTML, CSS, JS) without any front-end frameworks. -You gotta to build everything from scratch. Good luck! +This is an extremely straightforward Wails template, comprising essential web components (HTML, CSS, JS) and intentionally lacking any front-end frameworks, dependencies, or Node package management. As a result, you'll end up with an exceptionally lightweight source folder (1 - 5MB). +That being said, this is a good template for something like a ``Hello World`` application, which doesn't require you to store ~200-300MB of source files. + +You'll need to construct everything from the ground up. Good luck! ## Instruction 1. Do all the setup/ installation for [Wails](https://wails.io/docs/gettingstarted/installation). 2. Open command prompt on your desire directory. -3. ``$ wails init -n [your-app-name] -t https://github.com/KiddoV/wails-pure-js-template`` -4. ``$ cd ./[your-app-name]`` -5. ``$ wails dev`` +3. ``$> wails init -n [your-app-name] -t https://github.com/KiddoV/wails-pure-js-template`` +4. ``$> cd ./[your-app-name]`` +5. ``$> wails dev`` 6. Keep developing... ## Live Development -To run in live development mode, run `wails dev` in the project directory. In another terminal, go into the `frontend` -directory and run `npm run dev`. The frontend dev server will run on http://localhost:34115. Connect to this in your -browser and connect to your application. +To run in live development mode, run `wails dev` in the project directory. The frontend dev server will run on http://localhost:34115. Connect to this in your browser and connect to your application. ## Building -To build a redistributable, production mode package, use `wails build`. +To build a redistribute, production mode package, use `wails build`. Or build with [UPX](https://upx.github.io/) for better distribution size: ``wails build -upx -upxflags="--best --lzma"`` @@ -31,3 +29,13 @@ To use ``UPX``, you need to download and at least put the path in the ``System E *Windows* ![Capture](https://user-images.githubusercontent.com/28552977/191490618-b84d307e-f783-4c68-bd90-3f484de25478.PNG) +## Adding Dependencies + +You don't have to rely on ``npm`` to add dependencies. + +If your application requires internet access, you can add dependencies via a ``CDN`` links. +If your application is used offline, simply download dependencies and save them in the ``src/libs`` folder, then import them in the index.html file. +E.g. +```html + +``` \ No newline at end of file diff --git a/scripts/build-macos-arm.sh b/scripts/build-macos-arm.sh deleted file mode 100644 index bc6ee0a..0000000 --- a/scripts/build-macos-arm.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -echo -e "Start running the script..." -cd ../ - -echo -e "Start building the app for macos platform..." -wails build --clean --platform darwin/arm64 - -echo -e "End running the script!" diff --git a/scripts/build-macos-intel.sh b/scripts/build-macos-intel.sh deleted file mode 100644 index f359f63..0000000 --- a/scripts/build-macos-intel.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -echo -e "Start running the script..." -cd ../ - -echo -e "Start building the app for macos platform..." -wails build --clean --platform darwin - -echo -e "End running the script!" diff --git a/scripts/build-macos.sh b/scripts/build-macos.sh deleted file mode 100644 index d61531f..0000000 --- a/scripts/build-macos.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -echo -e "Start running the script..." -cd ../ - -echo -e "Start building the app for macos platform..." -wails build --clean --platform darwin/universal - -echo -e "End running the script!" diff --git a/scripts/build-windows.sh b/scripts/build-windows.sh deleted file mode 100644 index 47b7789..0000000 --- a/scripts/build-windows.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -echo -e "Start running the script..." -cd ../ - -echo -e "Start building the app for windows platform..." -wails build --clean --platform windows/amd64 - -echo -e "End running the script!" diff --git a/scripts/build.sh b/scripts/build.sh deleted file mode 100644 index 20ab7eb..0000000 --- a/scripts/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -echo -e "Start running the script..." -cd ../ - -echo -e "Start building the app..." -wails build --clean - -echo -e "End running the script!" diff --git a/scripts/install-wails-cli.sh b/scripts/install-wails-cli.sh deleted file mode 100644 index 7539d8e..0000000 --- a/scripts/install-wails-cli.sh +++ /dev/null @@ -1,14 +0,0 @@ -#! /bin/bash - -echo -e "Start running the script..." -cd ../ - -echo -e "Current Go version: \c" -go version - -echo -e "Install the Wails command line tool..." -go install github.com/wailsapp/wails/v2/cmd/wails@latest - -echo -e "Successful installation!" - -echo -e "End running the script!"