@trustme24/flext 1.2.0 → 1.3.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/README.md +18 -2
- package/dist/index.cjs +374 -186
- package/dist/index.css +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +34 -26
- package/dist/lib.d.ts +3 -0
- package/dist/modules/date/index.d.ts +17 -0
- package/dist/modules/index.d.ts +1 -0
- package/package.json +14 -12
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
## Flext
|
|
2
2
|
|
|
3
|
+
 
|
|
4
|
+
|
|
3
5
|
**Flext** is a lightweight extension over Handlebars. It introduces a small DSL for handling macros and modules to help create dynamic templates. The library is compiled to both ESM and CommonJS bundles and can be embedded in other projects such as [Vue components](https://www.npmjs.com/package/vue-flext).
|
|
4
6
|
|
|
5
7
|
Public documentation is available at [Wiki](https://trustmekz.atlassian.net/wiki/external/MTUwYzM5NjUzNDE4NDViMGJlMTliOWEzNzM1Y2RiZWE).
|
|
@@ -14,11 +16,11 @@ const template = `
|
|
|
14
16
|
{{!-- @v "1.0" --}}
|
|
15
17
|
{{!-- @use "put" --}}
|
|
16
18
|
|
|
17
|
-
<div class="text-center text-red-500">{{ put data.
|
|
19
|
+
<div class="text-center text-red-500">{{ put data.helloWorld 'No hello world...' }}</div>
|
|
18
20
|
`;
|
|
19
21
|
|
|
20
22
|
const flext = new Flext(template, {
|
|
21
|
-
data: {
|
|
23
|
+
data: { helloWorld: 'Hello World!' },
|
|
22
24
|
});
|
|
23
25
|
|
|
24
26
|
document.body.innerHTML = flext.html;
|
|
@@ -40,6 +42,20 @@ npm i tailwindcss @trustme24/flext
|
|
|
40
42
|
|
|
41
43
|
3. **You're all set!**
|
|
42
44
|
|
|
45
|
+
## Tests & Demo
|
|
46
|
+
|
|
47
|
+
- Test **App**:
|
|
48
|
+
|
|
49
|
+
```shell
|
|
50
|
+
npm run test-flext:app
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- **All tests:**
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
npm run test-flext
|
|
57
|
+
```
|
|
58
|
+
|
|
43
59
|
---
|
|
44
60
|
**Flext by Kenny Romanov**
|
|
45
61
|
TrustMe
|