elegance-js 2.1.14 → 2.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build.mjs
CHANGED
|
@@ -89,7 +89,7 @@ const runBuild = (filepath, DIST_DIR) => {
|
|
|
89
89
|
}
|
|
90
90
|
} else if (data === "set-pages-and-layouts") {
|
|
91
91
|
const { pageMap, layoutMap } = JSON.parse(message.content);
|
|
92
|
-
populateServerMaps(pageMap, layoutMap);
|
|
92
|
+
populateServerMaps(new Map(pageMap), new Map(layoutMap));
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
};
|
|
@@ -6,29 +6,36 @@ import { fileURLToPath } from "url";
|
|
|
6
6
|
import { buildClient, buildLayouts, buildPages, retrievePageAndLayoutMaps, setCompilationOptions, shipModules } from "./compilation";
|
|
7
7
|
let options = JSON.parse(process.env.OPTIONS || "{}");
|
|
8
8
|
const DIST_DIR = process.env.DIST_DIR;
|
|
9
|
-
|
|
9
|
+
function yellow(text) {
|
|
10
10
|
return `\x1B[38;2;238;184;68m${text}`;
|
|
11
|
-
}
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
;
|
|
13
|
+
function black(text) {
|
|
13
14
|
return `\x1B[38;2;0;0;0m${text}`;
|
|
14
|
-
}
|
|
15
|
-
|
|
15
|
+
}
|
|
16
|
+
;
|
|
17
|
+
function bgYellow(text) {
|
|
16
18
|
return `\x1B[48;2;238;184;68m${text}`;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
+
}
|
|
20
|
+
;
|
|
21
|
+
function bold(text) {
|
|
19
22
|
return `\x1B[1m${text}`;
|
|
20
|
-
}
|
|
21
|
-
|
|
23
|
+
}
|
|
24
|
+
;
|
|
25
|
+
function underline(text) {
|
|
22
26
|
return `\x1B[4m${text}`;
|
|
23
|
-
}
|
|
24
|
-
|
|
27
|
+
}
|
|
28
|
+
;
|
|
29
|
+
function white(text) {
|
|
25
30
|
return `\x1B[38;2;255;247;229m${text}`;
|
|
26
|
-
}
|
|
27
|
-
|
|
31
|
+
}
|
|
32
|
+
;
|
|
33
|
+
function log(...text) {
|
|
28
34
|
if (options.quiet) return;
|
|
29
35
|
return console.log(text.map((text2) => `${text2}\x1B[0m`).join(""));
|
|
30
|
-
}
|
|
31
|
-
|
|
36
|
+
}
|
|
37
|
+
;
|
|
38
|
+
async function build() {
|
|
32
39
|
setCompilationOptions(options, DIST_DIR);
|
|
33
40
|
try {
|
|
34
41
|
{
|
|
@@ -91,5 +98,5 @@ const build = async () => {
|
|
|
91
98
|
return false;
|
|
92
99
|
}
|
|
93
100
|
return true;
|
|
94
|
-
}
|
|
101
|
+
}
|
|
95
102
|
build();
|