elegance-js 2.1.35 → 2.1.36
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.
|
@@ -1123,6 +1123,7 @@ async function compileEntireProject() {
|
|
|
1123
1123
|
return;
|
|
1124
1124
|
};
|
|
1125
1125
|
formattedLog(LogLevel.DEBUG, "Compiling project..");
|
|
1126
|
+
const start = performance.now();
|
|
1126
1127
|
// This is used to restart us if we crash, via an FS watcher.
|
|
1127
1128
|
process.send?.(JSON.stringify({ message: "set-compiler-options", content: JSON.stringify(compilerOptions) }));
|
|
1128
1129
|
process.on("uncaughtException", gracefulErr);
|
|
@@ -1140,6 +1141,8 @@ async function compileEntireProject() {
|
|
|
1140
1141
|
cpSync(compilerOptions.publicDirectory, getDistDir(), { recursive: true, });
|
|
1141
1142
|
process.off("uncaughtException", gracefulErr);
|
|
1142
1143
|
process.off("unhandledRejection", gracefulErr);
|
|
1144
|
+
const end = performance.now();
|
|
1145
|
+
formattedLog(LogLevel.INFO, `Finished building in: ${Math.round(end - start)}ms`);
|
|
1143
1146
|
return {
|
|
1144
1147
|
allPages,
|
|
1145
1148
|
allLayouts,
|
package/dist/server/runtime.js
CHANGED
|
@@ -48,9 +48,8 @@ function restartEleganceRuntime() {
|
|
|
48
48
|
child.on("exit", (code) => {
|
|
49
49
|
if (code === 0)
|
|
50
50
|
return;
|
|
51
|
-
formattedLog(LogLevel.ERROR, "
|
|
51
|
+
formattedLog(LogLevel.ERROR, "Waiting for file changes..");
|
|
52
52
|
createRecursiveWatcher(compilerOptions.pagesDirectory, async (path) => {
|
|
53
|
-
formattedLog(LogLevel.INFO, "Change noticed after error, restarting Elegance Runtime..");
|
|
54
53
|
restartEleganceRuntime();
|
|
55
54
|
});
|
|
56
55
|
});
|
|
@@ -69,7 +68,7 @@ function restartEleganceRuntime() {
|
|
|
69
68
|
if (!serverIsActive) {
|
|
70
69
|
serverIsActive = true;
|
|
71
70
|
server.listen(4000, () => {
|
|
72
|
-
formattedLog(LogLevel.
|
|
71
|
+
formattedLog(LogLevel.DEBUG, "Hot-reload server listening on port 4000");
|
|
73
72
|
});
|
|
74
73
|
}
|
|
75
74
|
for (const client of clients) {
|
package/dist/server/server.js
CHANGED
|
@@ -546,7 +546,7 @@ async function serveProject(startupServerOptions) {
|
|
|
546
546
|
if (compilerOptions.doHotReload) {
|
|
547
547
|
process.send?.(JSON.stringify({ message: "hot-reload-finish" }));
|
|
548
548
|
}
|
|
549
|
-
formattedLog(LogLevel.INFO, `
|
|
549
|
+
formattedLog(LogLevel.INFO, `Website Live at: http://${serverOptions.hostname}:${port}/`);
|
|
550
550
|
});
|
|
551
551
|
return {
|
|
552
552
|
port,
|