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,
@@ -48,9 +48,8 @@ function restartEleganceRuntime() {
48
48
  child.on("exit", (code) => {
49
49
  if (code === 0)
50
50
  return;
51
- formattedLog(LogLevel.ERROR, "The Elegance runtime has crashed. Waiting for file changes..");
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.INFO, "Hot-reload server listening on port 4000");
71
+ formattedLog(LogLevel.DEBUG, "Hot-reload server listening on port 4000");
73
72
  });
74
73
  }
75
74
  for (const client of clients) {
@@ -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, `Server listening on port ${port}`);
549
+ formattedLog(LogLevel.INFO, `Website Live at: http://${serverOptions.hostname}:${port}/`);
550
550
  });
551
551
  return {
552
552
  port,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elegance-js",
3
- "version": "2.1.35",
3
+ "version": "2.1.36",
4
4
  "description": "Web-Framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",