Fix build

This commit is contained in:
pietervdvn 2021-01-18 01:48:08 +01:00
parent 21d2dc52c2
commit 0fee4cae58
6 changed files with 14491 additions and 96 deletions

View file

@ -2,7 +2,7 @@ import { Utils } from "../Utils";
export default class Constants {
public static vNumber = "0.4.9";
public static vNumber = "0.5.0-alpha-tailwind";
// The user journey states thresholds when a new feature gets unlocked
public static userJourney = {

View file

@ -81,7 +81,7 @@ I love it to see where the project ends up. You are free to reuse the software (
To develop:
0. Make sure you have a recent version of nodejs - at least 12.0, preferably 15
0. Make a fork and clone the repository.
1. Install `npm`. Linux: `sudo apt install npm` (or your favourite package manager), Windows: install nodeJS: https://nodejs.org/en/download/
2. Run `npm install` to install the package dependencies

View file

@ -11,12 +11,14 @@ export class DropDown<T> extends InputElement<T> {
private readonly _value: UIEventSource<T>;
public IsSelected: UIEventSource<boolean> = new UIEventSource<boolean>(false);
private readonly _label_class: string;
private readonly _select_class: string;
constructor(label: string | UIElement,
values: { value: T, shown: string | UIElement }[],
value: UIEventSource<T> = undefined,
label_class: string,
select_class: string) {
label_class: string = "",
select_class: string = "") {
super(undefined);
this._value = value ?? new UIEventSource<T>(undefined);
this._label = Translations.W(label);

14565
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -34,6 +34,7 @@
"@types/leaflet-providers": "^1.2.0",
"@types/leaflet.markercluster": "^1.4.3",
"autoprefixer": "^9.8.6",
"canvas": "^2.6.1",
"country-language": "^0.1.7",
"email-validator": "^2.0.4",
"escape-html": "^1.0.3",
@ -59,7 +60,6 @@
"@babel/polyfill": "^7.10.4",
"@types/node": "^7.0.5",
"assert": "^2.0.0",
"canvas": "^2.6.1",
"fs": "0.0.1-security",
"marked": "^1.1.1",
"promise-svg2img": "^0.2.0",

View file

@ -6,7 +6,7 @@ import LayoutConfig from "../Customizations/JSON/LayoutConfig";
import {AllKnownLayouts} from "../Customizations/AllKnownLayouts";
import {existsSync, mkdirSync, readFileSync, writeFile, writeFileSync} from "fs";
import Locale from "../UI/i18n/Locale";
import svg2img from 'promise-svg2img';
// import svg2img from 'promise-svg2img';
import Translations from "../UI/i18n/Translations";
import {Translation} from "../UI/i18n/Translation";
@ -101,6 +101,7 @@ function generateWikiEntry(layout: LayoutConfig){
const alreadyWritten = []
function createIcon(iconPath: string, size: number, layout: LayoutConfig) {
let name = iconPath.split(".").slice(0, -1).join(".");
if (name.startsWith("./")) {
@ -122,7 +123,8 @@ function createIcon(iconPath: string, size: number, layout: LayoutConfig) {
}
try {
console.log("Creating icon ", name, newname)
console.log("Could not create icon! ", name, newname)
/*
// We already read to file, in order to crash here if the file is not found
readFileSync(iconPath);
svg2img(iconPath,
@ -134,7 +136,7 @@ function createIcon(iconPath: string, size: number, layout: LayoutConfig) {
}).catch((error) => {
console.log("ERROR while writing" + iconPath, error)
});
//*/
} catch (e) {
console.error("Could not read icon", iconPath, "due to", e)
}
@ -142,6 +144,8 @@ function createIcon(iconPath: string, size: number, layout: LayoutConfig) {
return newname;
}
//*/
function createManifest(layout: LayoutConfig, relativePath: string) {
const name = layout.id;