neobiz 1.2.1 → 1.2.2

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +1 -1
  3. package/readme.md +16 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Abista_VD
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neobiz",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "simple view engine yet powerful with javascript features",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -19,6 +19,16 @@ Neobiz.js is pure JS lang, transpile Object to HTML as string
19
19
  | range | length:int, start:int | Array | shortcut for looping in a range |
20
20
  | partial | source:string | AsyncFn | including other file |
21
21
 
22
+ #### Why use this?
23
+
24
+ - One lang for all, backend-view-browser script all just use js!
25
+ - **directly** interact data or Model with a view
26
+ - Could generate static html file
27
+ - Full control of serving the view. Such as encrypting the data before serve, or just like conditional and loop case
28
+ - Almost no need to learn anything. Just need to learn how to render
29
+ - Limitless potential, because it's just js. Almost all library should be compatible
30
+ - Just like JSON replace XML
31
+
22
32
  ## Basic syntax
23
33
 
24
34
  It's just Object in js!
@@ -40,7 +50,7 @@ properties dom
40
50
  // text property is same as innerHTML
41
51
  h1: {
42
52
  class:"heading",
43
- text: "Hello World!";
53
+ text: "Hello World!",
44
54
  style:"color: #DC1E1E"
45
55
  }
46
56
  }
@@ -98,11 +108,14 @@ What if there is somethings in the middle of list?
98
108
 
99
109
  Can't use array? just use this:
100
110
 
111
+ > use string as key could distinc element just with a space
112
+ > no need to worry, it will render without space
113
+
101
114
  ```js
102
115
  {
103
116
  li:{text:"orange"},
104
117
  p:{span:{text:"This is in the middle"}}
105
- li:{text:"banana"},
118
+ "li ":{text:"banana"},
106
119
  }
107
120
  ```
108
121
 
@@ -231,7 +244,7 @@ while
231
244
 
232
245
  ### partial
233
246
 
234
- make sure to export as function & default
247
+ make sure to default export as a function
235
248
 
236
249
  ```js
237
250
  import { render, partial } from "../index.js";