manage new setup
This commit is contained in:
parent
fb34c2e4c0
commit
cdcab5bf38
@ -82,7 +82,7 @@ Wwws.initlocaldata = (tribe, appname, pagename, version, profils, lg) => {
|
|||||||
const loc = locals.pages[pagename];
|
const loc = locals.pages[pagename];
|
||||||
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(src))
|
||||||
console.log(path.resolve(`${loc.itms[r]}.json`))
|
console.log(path.resolve(`${loc.itms[r]}.json`))
|
||||||
if (fs.existsSync(src)) {
|
if (fs.existsSync(src)) {
|
||||||
@ -94,7 +94,7 @@ Wwws.initlocaldata = (tribe, appname, pagename, version, profils, lg) => {
|
|||||||
}
|
}
|
||||||
if (loc.ref) {
|
if (loc.ref) {
|
||||||
Object.keys(loc.ref).forEach((r) => {
|
Object.keys(loc.ref).forEach((r) => {
|
||||||
const src = `../../${loc.ref[r]}_${lg}.json`;
|
const src = `${loc.ref[r]}_${lg}.json`;
|
||||||
if (fs.existsSync(src)) {
|
if (fs.existsSync(src)) {
|
||||||
localstorage.ref[r] = fs.readJSONSync(src);
|
localstorage.ref[r] = fs.readJSONSync(src);
|
||||||
} else {
|
} else {
|
||||||
@ -106,7 +106,7 @@ Wwws.initlocaldata = (tribe, appname, pagename, version, profils, lg) => {
|
|||||||
}
|
}
|
||||||
if (loc.options) {
|
if (loc.options) {
|
||||||
Object.keys(loc.options).forEach((r) => {
|
Object.keys(loc.options).forEach((r) => {
|
||||||
const src = `../../${loc.options[r]}_${lg}.json`;
|
const src = `${loc.options[r]}_${lg}.json`;
|
||||||
if (fs.existsSync(src)) {
|
if (fs.existsSync(src)) {
|
||||||
localstorage.options[r] = fs.readJSONSync(src);
|
localstorage.options[r] = fs.readJSONSync(src);
|
||||||
} else {
|
} else {
|
||||||
@ -127,7 +127,7 @@ Wwws.initlocaldata = (tribe, appname, pagename, version, profils, lg) => {
|
|||||||
}
|
}
|
||||||
if (loc.tpl) {
|
if (loc.tpl) {
|
||||||
Object.keys(loc.tpl).forEach((r) => {
|
Object.keys(loc.tpl).forEach((r) => {
|
||||||
let src = `../../${loc.tpl[r]}`;
|
let src = `${loc.tpl[r]}`;
|
||||||
console.log(path.resolve(src))
|
console.log(path.resolve(src))
|
||||||
if (!fs.existsSync(src)) {
|
if (!fs.existsSync(src)) {
|
||||||
src += `_${lg}.mustache`;
|
src += `_${lg}.mustache`;
|
||||||
@ -143,7 +143,7 @@ Wwws.initlocaldata = (tribe, appname, pagename, version, profils, lg) => {
|
|||||||
}
|
}
|
||||||
if (loc.tpldata) {
|
if (loc.tpldata) {
|
||||||
Object.keys(loc.tpldata).forEach((r) => {
|
Object.keys(loc.tpldata).forEach((r) => {
|
||||||
let src = `../../${loc.tpldata[r]}`;
|
let src = `${loc.tpldata[r]}`;
|
||||||
console.log(path.resolve(src))
|
console.log(path.resolve(src))
|
||||||
if (!fs.existsSync(src)) {
|
if (!fs.existsSync(src)) {
|
||||||
src += `_${lg}.json`;
|
src += `_${lg}.json`;
|
||||||
|
Loading…
Reference in New Issue
Block a user