Skip to content

Commit

Permalink
1.18.6
Browse files Browse the repository at this point in the history
  • Loading branch information
pamydev committed May 18, 2024
1 parent 40babec commit e75acf2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "winnetoujs",
"version": "1.18.5",
"version": "1.18.6",
"description": "The indie javascript constructor",
"main": "src/winnetou.js",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion scaffolding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"recursive-readdir": "^2.2.2",
"sass": "^1.77.1",
"uglifycss": "0.0.29",
"winnetoujs": "^1.18.5",
"winnetoujs": "^1.18.6",
"xml-parse": "^0.4.0"
},
"devDependencies": {
Expand Down
22 changes: 8 additions & 14 deletions wbr.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ let global = {
init: new Date().getTime(),
finish: null,
res: null,
transpileComplete: false,
transpileIconsComplete: false,
};

class WBR {
Expand Down Expand Up @@ -209,6 +207,9 @@ class WBR {
}

watchFiles() {
new Drawer().drawText("Live reload enabled. Watching for changes...", {
color: "dim",
});
const refresh = name => {
new Drawer().drawChange(name);
global.idList = [];
Expand Down Expand Up @@ -241,13 +242,10 @@ class WBR {
global.config.constructosPath,
{ recursive: true },
async (evt, name) => {
if (global.transpileComplete && global.transpileIconsComplete) {
global.transpileComplete = false;
refresh(name);
await new Constructos().transpile(name);
this.getTimeElapsed();
new Drawer().drawFinal();
}
refresh(name);
await new Constructos().transpile(name);
this.getTimeElapsed();
new Drawer().drawFinal();
}
);
} catch (e) {}
Expand All @@ -259,8 +257,7 @@ class WBR {
try {
watch.default(folders, { recursive: true }, async (evt, name) => {
refresh(name);
global.transpileComplete = false;
global.transpileIconsComplete = false;

await new Icons().transpile();
await new Constructos().transpile();
this.getTimeElapsed();
Expand Down Expand Up @@ -433,7 +430,6 @@ class Icons {
});

Promise.all(finalPromise).then(res => {
global.transpileIconsComplete = true;
return resolve(true);
});
});
Expand Down Expand Up @@ -789,8 +785,6 @@ class Constructos {
await fs.outputFile(pathOut, resultadoFinal);
}

global.transpileComplete = true;

return resolve(true);
});
});
Expand Down

0 comments on commit e75acf2

Please sign in to comment.