elegance-js 1.9.5 → 1.9.6

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
@@ -347,15 +347,18 @@ var getAllSubdirectories = (dir, baseDir = dir) => {
347
347
  }
348
348
  return directories;
349
349
  };
350
+ var child = void 0;
350
351
  var runBuild = (filepath, DIST_DIR) => {
351
- const code = fs2.readFileSync(filepath).toString();
352
352
  const optionsString = JSON.stringify(options);
353
- const child = child_process.spawn("node", ["-e", code], {
353
+ if (child !== void 0) {
354
+ child.kill();
355
+ }
356
+ child = child_process.spawn("node", [filepath], {
354
357
  stdio: ["inherit", "inherit", "inherit", "ipc"],
355
358
  env: { ...process.env, DIST_DIR, OPTIONS: optionsString, PACKAGE_PATH: packageDir }
356
359
  });
357
360
  child.on("error", () => {
358
- console.error("Failed to start child process.");
361
+ log.error("Failed to start child process.");
359
362
  });
360
363
  child.on("message", (message) => {
361
364
  const { data } = message;
@@ -350,15 +350,18 @@ var getAllSubdirectories = (dir, baseDir = dir) => {
350
350
  }
351
351
  return directories;
352
352
  };
353
+ var child = void 0;
353
354
  var runBuild = (filepath, DIST_DIR) => {
354
- const code = fs2.readFileSync(filepath).toString();
355
355
  const optionsString = JSON.stringify(options);
356
- const child = child_process.spawn("node", ["-e", code], {
356
+ if (child !== void 0) {
357
+ child.kill();
358
+ }
359
+ child = child_process.spawn("node", [filepath], {
357
360
  stdio: ["inherit", "inherit", "inherit", "ipc"],
358
361
  env: { ...process.env, DIST_DIR, OPTIONS: optionsString, PACKAGE_PATH: packageDir }
359
362
  });
360
363
  child.on("error", () => {
361
- console.error("Failed to start child process.");
364
+ log.error("Failed to start child process.");
362
365
  });
363
366
  child.on("message", (message) => {
364
367
  const { data } = message;
@@ -714,7 +714,6 @@ var build = async () => {
714
714
  "PROD": options.environment === "development" ? "false" : "true"
715
715
  }
716
716
  });
717
- console.log("built files");
718
717
  }
719
718
  const pagesTranspiled = performance.now();
720
719
  const {
@@ -733,7 +732,7 @@ var build = async () => {
733
732
  await fs.promises.cp(src, path.join(DIST_DIR), { recursive: true });
734
733
  }
735
734
  {
736
- log(`${Math.round(pagesTranspiled - start)}ms to Transpile Pages`);
735
+ log(`${Math.round(pagesTranspiled - start)}ms to Transpile Fales`);
737
736
  log(`${Math.round(pagesBuilt - pagesTranspiled)}ms to Build Pages`);
738
737
  log(`${Math.round(end - pagesBuilt)}ms to Build Client`);
739
738
  log(green(bold(`Compiled ${projectFiles.length} files in ${Math.ceil(end - start)}ms!`)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elegance-js",
3
- "version": "1.9.5",
3
+ "version": "1.9.6",
4
4
  "description": "Web-Framework",
5
5
  "type": "module",
6
6
  "bin": {