@spirobel/mininext 0.2.21 → 0.2.23

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/README.md CHANGED
@@ -55,3 +55,13 @@ build:
55
55
  ```bash
56
56
  bun run build
57
57
  ```
58
+
59
+ ## Tutorial
60
+
61
+ If you understand these 3 basic concepts you can build your own website with mininext:
62
+
63
+ 1. html + css
64
+ 2. templating
65
+ 3. you can use data inside of your html templates
66
+
67
+ Tutorial video: [intro to mininext](https://www.youtube.com/watch?v=rz4awKntpzE)
package/dist/html.js CHANGED
@@ -122,9 +122,10 @@ function JsonTemplateProcessor(danger = false) {
122
122
  values[index] = value;
123
123
  }
124
124
  else if (!(value instanceof JsonString)) {
125
- const notEmpty = value || "";
126
125
  // values will be turned into a JSON string
127
- values[index] = JSON.stringify(notEmpty);
126
+ if (value) {
127
+ values[index] = JSON.stringify(value);
128
+ }
128
129
  }
129
130
  jsonStringArray.push(values[index]);
130
131
  }
package/mininext/html.ts CHANGED
@@ -157,9 +157,10 @@ function JsonTemplateProcessor(danger: boolean = false) {
157
157
  }
158
158
  values[index] = value;
159
159
  } else if (!(value instanceof JsonString)) {
160
- const notEmpty = value || "";
161
160
  // values will be turned into a JSON string
162
- values[index] = JSON.stringify(notEmpty);
161
+ if (value) {
162
+ values[index] = JSON.stringify(value);
163
+ }
163
164
  }
164
165
  jsonStringArray.push(values[index]);
165
166
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  },
13
13
  "files": ["dist", "mininext"],
14
- "version": "0.2.21",
14
+ "version": "0.2.23",
15
15
  "devDependencies": {
16
16
  "@types/bun": "latest"
17
17
  },