elegance-js 1.14.0 → 1.14.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elegance-js",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "Web-Framework",
5
5
  "type": "module",
6
6
  "bin": {
@@ -7,7 +7,7 @@ import { execSync } from "node:child_process";
7
7
 
8
8
  execSync("npm install tailwindcss @tailwindcss/cli");
9
9
 
10
- const dirs = ["pages", "public"];
10
+ const dirs = ["pages", "public", "pages/components"];
11
11
  dirs.forEach((dir) => {
12
12
  if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
13
13
  });
@@ -58,6 +58,17 @@ loadHook(
58
58
  },
59
59
  )
60
60
 
61
+ /*
62
+ This variable lets you determine whether your page is:
63
+ 1. Built at compile time (non dynamic page).
64
+ Meaning, the page is turned into HTML, CSS and JS *once*, and then served statically.
65
+
66
+ 2. Built per-request (dynamic page).
67
+ Meaning the page is *transpiled into JS*, and then every time someone requests the page,
68
+ it is built and then served.
69
+ */
70
+ export const isDynamicPage = true;
71
+
61
72
  /*
62
73
  State can also be an array!
63
74
  In which case, the reactiveMap() method is added onto the state.
@@ -114,7 +125,7 @@ export const page: Page = async () => {
114
125
  h1 ({
115
126
  class: "text-4xl font-inter font-semibold bg-clip-text text-transparent bg-gradient-to-tl from-[#EEB844] to-[#FF4FED] oveflow-clip",
116
127
  },
117
- `Welcome to ${pageName.value}!`,
128
+ \`Welcome to \${pageName.value}!\`,
118
129
  ),
119
130
 
120
131
  ReactiveMap(),