miki-template 2.3.0 → 2.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 +17 -5
- package/docs/performance.md +1 -1
- package/overrides/main.html +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
# miki-template
|
|
2
|
+
###
|
|
2
3
|

|
|
3
4
|
 
|
|
4
5
|
|
|
5
6
|
**Django-style template magic for Node.js — blazing fast partials, smart template discovery, and zero friction for HTMX.**
|
|
6
7
|
|
|
8
|
+
|
|
7
9
|
Define reusable partials with `{% partialdef %}`, render any slice of a page with `render('home#card')`, and let the engine find templates across your whole project — `templates/`, `app/templates/`, or whatever structure you prefer. No more wrestling with view paths or boilerplate middleware.
|
|
8
10
|
|
|
11
|
+
miki comes with more tags and filters that are not in django/jinja and miki templates supports all django tags and filters plus it own additional tags and filters.
|
|
12
|
+
you can register your own custom filters and filters in miki templates.
|
|
13
|
+
|
|
9
14
|
---
|
|
10
15
|
|
|
11
16
|
## 🚀 Features
|
|
@@ -61,11 +66,18 @@ miki-template is built for real-world apps. Its compiled-AST engine is especiall
|
|
|
61
66
|
|
|
62
67
|
**Benchmark: renders per second (higher is better)**
|
|
63
68
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
|
|
70
|
+
| Template | miki-template | pug | handlebars | ejs |
|
|
71
|
+
|
|
72
|
+
|----------|--------------|-----|------------|-----|
|
|
73
|
+
|
|
74
|
+
| Small | ~1.1M rps | 1.1M rps | 300k rps | 113k rps |
|
|
75
|
+
|
|
76
|
+
| Medium | ~40k rps | 27k rps | 4k rps | 2k rps |
|
|
77
|
+
|
|
78
|
+
| Large | **~2530 rps** | 1886 rps | 493 rps | 1881 rps |
|
|
79
|
+
|
|
80
|
+
|
|
69
81
|
|
|
70
82
|
> **TL;DR**: On medium templates miki-template is competitive with pug, and on large/realistic pages it **dominates by ~150×** versus pug, handlebars, and ejs. That’s where production apps live, and that’s where miki wins.
|
|
71
83
|
|
package/docs/performance.md
CHANGED
|
@@ -18,7 +18,7 @@ Renders per second (higher is better):
|
|
|
18
18
|
|
|
19
19
|
|----------|--------------|-----|------------|-----|
|
|
20
20
|
|
|
21
|
-
| Small | ~
|
|
21
|
+
| Small | ~1.1M rps | 1.1M rps | 300k rps | 113k rps |
|
|
22
22
|
|
|
23
23
|
| Medium | ~40k rps | 27k rps | 4k rps | 2k rps |
|
|
24
24
|
|
package/overrides/main.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{% block announce %}
|
|
4
4
|
<div class="md-announce" role="banner">
|
|
5
5
|
<div class="md-announce__inner">
|
|
6
|
-
<span>🚀 <strong>miki-template v2.
|
|
6
|
+
<span>🚀 <strong>miki-template v2.3.1</strong> is now available with improved performance and new features!</span>
|
|
7
7
|
<a href="https://github.com/alainmiki/miki-template/releases" target="_blank" rel="noopener">View Release Notes</a>
|
|
8
8
|
<button class="md-announce__button" onclick="this.closest('.md-announce').remove()" aria-label="Dismiss announcement">
|
|
9
9
|
<span class="md-icon">✕</span>
|