small cleanup

This commit is contained in:
Sören Oesterwind 2022-11-13 00:46:18 +01:00
parent 3eab7cc6eb
commit 811d96f5fa
7 changed files with 3844 additions and 302 deletions

3
.gitignore vendored
View File

@ -8,4 +8,5 @@ bom.json
log-journal.json
openCountdown
openCountdown.exe
buildout
buildout
package-lock.json

View File

@ -10,19 +10,19 @@ Support for companion is currently being worked on [here](https://github.com/bit
You can download complete binaries from the release tab.
## Development build
1. Download the repository
2. `npm install` to install dependecies
2. `npm install` to install dependencies
3. `npm start` to launch
### Startup Arguments
One can pass a `--headless` argument to start the server in headless mode. This will disable the GUI.
## Packaging
This is more a comment for the future version of me. There is one command for packaging using nexe.
We've introduced a new packaging system. It is based on [electron-builder](https://www.electron.build/). This allows for easy packaging of the application for different platforms.
```bash
npx nexe index.js --build --python python3 --resource "./{lang,templates,static}/**/*" --ouput "openCountdown.exe”
chmod +x ./build.sh
./build.sh
```
Where `--python` is only needed in some envoirments for some reason. Also adjust `--output` for your target OS.
> Binary Builds may be faulty or non-working. They are not offically supported.
> Binary Builds may be faulty or non-working. They are not officially supported.
*Small disclaimer: Please do not use openCountdown for military or life-depending applications. Please also refrain from using openCountdown for launching rockets.*

View File

@ -25,7 +25,7 @@ function close(){
/**
* A simple logging function
* @param {String} message A messaged to be logged
* @param {String} level Logleve, may either be warn, error, magic or info
* @param {String} level Loglevel, may either be warn, error, magic or info
* @param {String} module Kinda the source
*/
function log(message, level, module, ignore = false) {
@ -58,4 +58,4 @@ function log(message, level, module, ignore = false) {
}
}
module.exports = { log, init, close};
module.exports = { log, init, close };

4077
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,38 +2,38 @@
"name": "opencountdown",
"version": "1.0.4",
"description": "An opensource countdown",
"main": "newStartHandler.js",
"main": "startHandler.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron newStartHandler.js"
"test": "echo \"Error: no test specified\" && exit 1",
"start": "electron startHandler.js"
},
"author": "TheGreydiamond",
"license": "LGPL-3.0",
"dependencies": {
"body-parser": "^1.19.2",
"bootstrap": "^5.1.3",
"bootstrap-duration-picker": "^2.1.3",
"bootstrap-icons": "^1.8.1",
"colors": "^1.4.0",
"darkreader": "^4.9.44",
"eta": "^1.12.3",
"express": "^4.17.3",
"flatpickr": "^4.6.11",
"jquery": "^3.6.0",
"js-cookie": "^3.0.1",
"less": "^3.13",
"mdbootstrap": "^4.20.0",
"open": "^8.4.0",
"underscore": "^1.13.3",
"ws": "^8.5.0"
"body-parser": "^1.20.1",
"bootstrap": "^5.2.2",
"bootstrap-duration-picker": "^2.1.3",
"bootstrap-icons": "^1.10.1",
"colors": "^1.4.0",
"darkreader": "^4.9.58",
"eta": "^1.12.3",
"express": "^4.18.2",
"flatpickr": "^4.6.13",
"jquery": "^3.6.1",
"js-cookie": "^3.0.1",
"less": "^4.1.3",
"mdbootstrap": "^4.20.0",
"open": "^8.4.0",
"underscore": "^1.13.6",
"ws": "^8.11.0"
},
"devDependencies": {
"electron": "^20.0.3"
"electron": "^21.2.3",
"electron-builder": "^23.6.0"
},
"build": {
"extraMetadata": {
"main": "newStartHandler.js"
}
"extraMetadata": {
"main": "startHandler.js"
}
}
}
}

View File

@ -88,7 +88,7 @@ const createWindow = () => {
win.loadFile('electronAssets/index2.html')
win.loadFile('electronAssets/index.html')
if (configObject.startMinimised) {
win.hide()
}