manage new setup

This commit is contained in:
philc 2024-11-15 09:39:47 +01:00
parent 91945ff3fc
commit fb34c2e4c0

View File

@ -47,7 +47,7 @@ Wwws.initlocaldata = (tribe, appname, pagename, version, profils, lg) => {
}; };
} }
//check version //check version
const initname = `../../tmp/initlocaldata/${tribe}_${appname}_${pagename}_${lg}_${locals.pages[pagename].version}.json`; const initname = `../tmp/initlocaldata/${tribe}_${appname}_${pagename}_${lg}_${locals.pages[pagename].version}.json`;
if (fs.existsSync(initname) && 1 != 1) { if (fs.existsSync(initname) && 1 != 1) {
const init = fs.readJsonSync(initname); const init = fs.readJsonSync(initname);
if (init.app.version == locals.app.version) { if (init.app.version == locals.app.version) {
@ -83,6 +83,8 @@ Wwws.initlocaldata = (tribe, appname, pagename, version, profils, lg) => {
if (loc.itms){ if (loc.itms){
Object.keys(loc.itms).forEach((r) => { Object.keys(loc.itms).forEach((r) => {
const src = `../../${loc.itms[r]}.json`; const src = `../../${loc.itms[r]}.json`;
console.log(path.resolve(src))
console.log(path.resolve(`${loc.itms[r]}.json`))
if (fs.existsSync(src)) { if (fs.existsSync(src)) {
localstorage.itms[r] = fs.readJSONSync(src); localstorage.itms[r] = fs.readJSONSync(src);
} else { } else {