3 Commits

Author SHA1 Message Date
a2106f01b1 Merge pull request 'Porintg more fixes' (#4) from language into master
Reviewed-on: #4
2022-07-13 18:27:54 +02:00
22de906767 - add a build command
- fix an error in swagger doc
2022-07-13 18:26:50 +02:00
fcc2172f1f fixing config.json not existing causing a crash 2022-07-13 18:24:17 +02:00
4 changed files with 7 additions and 3 deletions

1
build.ssh Normal file
View File

@@ -0,0 +1 @@
nexe index.js --build --python python3 --resource "./static/*" --resource "./templates/*"

View File

@@ -170,7 +170,7 @@ paths:
operationId: "textEnableColoring"
parameters:
- in: path
name: "show"
name: "enable"
required: true
type: boolean
description: "If true the timer will change color by value, else the timer stays white."

View File

@@ -58,7 +58,9 @@ currentState = {
let configObject = {
language: "en_uk"
}
if(!fs.existsSync("config.json")) {
fs.writeFileSync("config.json", "{}");
}
const tempJsonText = JSON.parse(fs.readFileSync("config.json", "utf8"));
configObject = _.extend(configObject, tempJsonText);
fs.writeFileSync("config.json", JSON.stringify(configObject));

View File

@@ -4,7 +4,8 @@
"description": "An opensource countdown",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "nexe index.js --build"
},
"author": "TheGreydiamond",
"license": "LGPL-3.0",