elegance-js 2.0.8 → 2.0.10

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.
@@ -792,10 +792,11 @@ var buildPages = async (DIST_DIR2) => {
792
792
  for (const file of files) {
793
793
  const filePath = path.join(file.parentPath, file.name);
794
794
  const name = file.name.slice(0, file.name.length - 3);
795
- const isPage = file.name.includes("page");
795
+ const isPage = name === "page";
796
796
  if (isPage == false) {
797
797
  continue;
798
798
  }
799
+ console.log("building page with", DIST_DIR2, `d: ${directory}`, filePath, name);
799
800
  try {
800
801
  const hardReloadForPage = await buildPage(DIST_DIR2, directory, filePath, name);
801
802
  if (hardReloadForPage) {
@@ -863,7 +864,7 @@ var buildPage = async (DIST_DIR2, directory, filePath, name) => {
863
864
  const objectAttributes = getObjectAttributes();
864
865
  const layout = await fetchPageLayoutHTML(path.dirname(filePath));
865
866
  const foundObjectAttributes = await pageToHTML(
866
- path.dirname(path.join(DIST_DIR2, directory)),
867
+ path.join(DIST_DIR2, directory),
867
868
  pageElements || body(),
868
869
  metadata ?? (() => head()),
869
870
  DIST_DIR2,
@@ -875,7 +876,7 @@ var buildPage = async (DIST_DIR2, directory, filePath, name) => {
875
876
  const {
876
877
  sendHardReloadInstruction
877
878
  } = await generateClientPageData(
878
- path.dirname(path.join(DIST_DIR2, "dist", directory)),
879
+ path.join(DIST_DIR2, directory),
879
880
  state || {},
880
881
  [...objectAttributes, ...foundObjectAttributes],
881
882
  pageLoadHooks || [],
@@ -943,7 +944,7 @@ var build = async () => {
943
944
  const pagesTranspiled = performance.now();
944
945
  let shouldClientHardReload;
945
946
  {
946
- const { shouldClientHardReload: doReload } = await buildPages(DIST_DIR);
947
+ const { shouldClientHardReload: doReload } = await buildPages(path.resolve(DIST_DIR));
947
948
  if (doReload) shouldClientHardReload = true;
948
949
  }
949
950
  const pagesBuilt = performance.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elegance-js",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "Web-Framework",
5
5
  "type": "module",
6
6
  "bin": {