miki-template 2.3.1 → 2.3.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 (159) hide show
  1. package/package.json +45 -1
  2. package/.eslintrc.json +0 -16
  3. package/.github/release-notes/v1.3.1.md +0 -55
  4. package/.github/release-notes/v1.3.3.md +0 -77
  5. package/.github/release-notes/v1.3.7.md +0 -20
  6. package/.github/workflows/ci.yml +0 -42
  7. package/.github/workflows/docs.yml +0 -107
  8. package/.github/workflows/release.yml +0 -107
  9. package/AGENT.md +0 -71
  10. package/API_REFERENCE.md +0 -341
  11. package/CHANGELOG.md +0 -173
  12. package/CODE_OF_CONDUCT.md +0 -14
  13. package/CONTRIBUTING.md +0 -27
  14. package/ROADMAP.md +0 -40
  15. package/assets/banner.png +0 -0
  16. package/assets/logo.png +0 -0
  17. package/benchmarks/ejs-results.json +0 -17
  18. package/benchmarks/ejs.js +0 -38
  19. package/benchmarks/handlebars-results.json +0 -17
  20. package/benchmarks/handlebars.js +0 -45
  21. package/benchmarks/miki-results.json +0 -17
  22. package/benchmarks/miki.js +0 -39
  23. package/benchmarks/pug-results.json +0 -17
  24. package/benchmarks/pug.js +0 -38
  25. package/benchmarks/report.json +0 -17
  26. package/benchmarks/run.js +0 -81
  27. package/benchmarks/stress.mjs +0 -647
  28. package/benchmarks/templates/large.dtpl +0 -7
  29. package/benchmarks/templates/medium.dtpl +0 -3
  30. package/benchmarks/templates/small.dtpl +0 -7
  31. package/context/component.md +0 -109
  32. package/context/prd.md +0 -131
  33. package/context/project-structure.md +0 -33
  34. package/dir/base.html +0 -23
  35. package/dir/cmpnt.html +0 -11
  36. package/dir/footer.html +0 -3
  37. package/dir/home.html +0 -80
  38. package/dir/index.html +0 -80
  39. package/dir/navbar.html +0 -9
  40. package/docs/api/async-render.md +0 -170
  41. package/docs/api/cache.md +0 -174
  42. package/docs/api/compile.md +0 -256
  43. package/docs/api/context-processors.md +0 -154
  44. package/docs/api/filters.md +0 -437
  45. package/docs/api/finder.md +0 -188
  46. package/docs/api/helpers.md +0 -106
  47. package/docs/api/i18n.md +0 -314
  48. package/docs/api/index.md +0 -108
  49. package/docs/api/libraries.md +0 -414
  50. package/docs/api/render-partial.md +0 -162
  51. package/docs/api/render.md +0 -184
  52. package/docs/api/security.md +0 -290
  53. package/docs/api/setup-express.md +0 -152
  54. package/docs/api/tags.md +0 -268
  55. package/docs/assets/banner.png +0 -0
  56. package/docs/assets/logo.png +0 -0
  57. package/docs/filter.md +0 -0
  58. package/docs/guide/advanced-usage.md +0 -794
  59. package/docs/guide/async-rendering.md +0 -616
  60. package/docs/guide/context-processors.md +0 -514
  61. package/docs/guide/custom-filters.md +0 -622
  62. package/docs/guide/custom-tags.md +0 -542
  63. package/docs/guide/filters.md +0 -1314
  64. package/docs/guide/getting-started.md +0 -204
  65. package/docs/guide/installation.md +0 -190
  66. package/docs/guide/partial-templates.md +0 -734
  67. package/docs/guide/quick-start.md +0 -444
  68. package/docs/guide/security.md +0 -690
  69. package/docs/guide/tags.md +0 -1566
  70. package/docs/guide/template-discovery.md +0 -340
  71. package/docs/guide/template-inheritance.md +0 -546
  72. package/docs/guide/what-is-miki-template.md +0 -28
  73. package/docs/guide/why-miki-template.md +0 -75
  74. package/docs/index.md +0 -86
  75. package/docs/integrations/elysia.md +0 -80
  76. package/docs/integrations/express.md +0 -219
  77. package/docs/integrations/fastify.md +0 -79
  78. package/docs/integrations/hono.md +0 -80
  79. package/docs/integrations/index.md +0 -68
  80. package/docs/integrations/koa.md +0 -90
  81. package/docs/integrations/nestjs.md +0 -80
  82. package/docs/integrations/tsed.md +0 -83
  83. package/docs/performance.md +0 -74
  84. package/eslint.config.mjs +0 -42
  85. package/ex.mjs +0 -36
  86. package/live-test/integrations/elysia-example.js +0 -16
  87. package/live-test/integrations/express-example.js +0 -24
  88. package/live-test/integrations/fastify-example.js +0 -20
  89. package/live-test/integrations/hono-example.js +0 -16
  90. package/live-test/integrations/koa-example.js +0 -30
  91. package/live-test/integrations/nestjs-example.js +0 -25
  92. package/live-test/integrations/smoke-test.js +0 -166
  93. package/live-test/integrations/tsed-example.js +0 -23
  94. package/live-test/package-lock.json +0 -1150
  95. package/live-test/package.json +0 -13
  96. package/live-test/packages/product/templates/product/detail.html +0 -7
  97. package/live-test/server.js +0 -38
  98. package/live-test/templates/app_templates/detail.html +0 -6
  99. package/live-test/views/base.html +0 -8
  100. package/live-test/views/child.html +0 -7
  101. package/live-test/views/home.html +0 -17
  102. package/live-test/views/index.html +0 -1
  103. package/miki-template-extension/.github/workflows/ci.yml +0 -116
  104. package/miki-template-extension/.vscodeignore +0 -7
  105. package/miki-template-extension/CHANGELOG.md +0 -99
  106. package/miki-template-extension/LICENSE +0 -21
  107. package/miki-template-extension/README.md +0 -273
  108. package/miki-template-extension/extension.js +0 -1013
  109. package/miki-template-extension/icon.png +0 -0
  110. package/miki-template-extension/icon.svg +0 -10
  111. package/miki-template-extension/miki-template-1.7.1.vsix +0 -0
  112. package/miki-template-extension/package.json +0 -280
  113. package/miki-template-extension/snippets/miki-template.json +0 -717
  114. package/miki-template-extension/syntaxes/language-configuration.json +0 -114
  115. package/miki-template-extension/syntaxes/miki-template.tmLanguage.json +0 -355
  116. package/miki-template-extension/tests/grammar-tests.json +0 -162
  117. package/miki-template-extension/tests/run-grammar-tests.js +0 -82
  118. package/mkdocs.yml +0 -195
  119. package/overrides/main.html +0 -26
  120. package/requirements-docs.txt +0 -2
  121. package/sample-app/package-lock.json +0 -901
  122. package/sample-app/package.json +0 -9
  123. package/sample-app/server.js +0 -14
  124. package/sample-app/views/index.html +0 -1
  125. package/scripts/build-vsix.js +0 -129
  126. package/scripts/build-vsix.ps1 +0 -15
  127. package/snippets/miki-template.json +0 -177
  128. package/src/asyncRender.js +0 -21
  129. package/src/types.d.ts +0 -107
  130. package/syntaxes/language-configuration.json +0 -26
  131. package/syntaxes/miki-template.tmLanguage.json +0 -146
  132. package/tests/asyncRender.test.js +0 -17
  133. package/tests/base.html +0 -6
  134. package/tests/child.html +0 -3
  135. package/tests/context_processors.test.js +0 -13
  136. package/tests/esm.test.mjs +0 -61
  137. package/tests/filters.test.js +0 -263
  138. package/tests/finder-appdirs.test.js +0 -19
  139. package/tests/finder.test.js +0 -17
  140. package/tests/fixtures/views/nested/index.html +0 -1
  141. package/tests/fixtures/views/partial.html +0 -1
  142. package/tests/fixtures/views/sub/deepfile.html +0 -1
  143. package/tests/fixtures/views-appdirs/product/site/detail.html +0 -1
  144. package/tests/include_security.test.js +0 -9
  145. package/tests/integration/README.md +0 -32
  146. package/tests/integration/features.test.cjs +0 -1681
  147. package/tests/integration/features.test.mjs +0 -1697
  148. package/tests/integration/finder.esm.test.mjs +0 -13
  149. package/tests/integration/partial-render.test.cjs +0 -13
  150. package/tests/integration/templates/base.miki +0 -6
  151. package/tests/integration/templates/child.miki +0 -6
  152. package/tests/integration/templates/index.html +0 -17
  153. package/tests/lexer.test.js +0 -45
  154. package/tests/parser.test.js +0 -57
  155. package/tests/partial.html +0 -1
  156. package/tests/partialdef.test.js +0 -79
  157. package/tests/production_checks.js +0 -57
  158. package/tests/security.test.js +0 -28
  159. package/tests/tags.test.js +0 -233
@@ -1,82 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const grammarTests = JSON.parse(fs.readFileSync(__dirname + '/grammar-tests.json', 'utf8'));
5
-
6
- let passed = 0;
7
- let failed = 0;
8
-
9
- console.log('Running grammar tests...\n');
10
-
11
- grammarTests.grammarTests.forEach(test => {
12
- try {
13
- console.log(`Test: ${test.name}`);
14
-
15
- if (test.input) {
16
- console.log(` Input: ${test.input.substring(0, 50)}${test.input.length > 50 ? '...' : ''}`);
17
- }
18
-
19
- if (test.expectedTags) {
20
- const missing = test.expectedTags.filter(tag => !test.input.includes(`{% ${tag}`));
21
- if (missing.length > 0) {
22
- console.log(` FAIL: Missing tags: ${missing.join(', ')}`);
23
- failed++;
24
- return;
25
- }
26
- }
27
-
28
- if (test.expectedFilters) {
29
- const missing = test.expectedFilters.filter(f => !test.input.includes(`|${f}`));
30
- if (missing.length > 0) {
31
- console.log(` FAIL: Missing filters: ${missing.join(', ')}`);
32
- failed++;
33
- return;
34
- }
35
- }
36
-
37
- if (test.expectedOperators) {
38
- const missing = test.expectedOperators.filter(op => !test.input.includes(op));
39
- if (missing.length > 0) {
40
- console.log(` FAIL: Missing operators: ${missing.join(', ')}`);
41
- failed++;
42
- return;
43
- }
44
- }
45
-
46
- console.log(' PASS');
47
- passed++;
48
- } catch (err) {
49
- console.log(` ERROR: ${err.message}`);
50
- failed++;
51
- }
52
- });
53
-
54
- console.log('\nValidation tests...\n');
55
-
56
- grammarTests.validationTests.forEach(test => {
57
- try {
58
- console.log(`Test: ${test.name}`);
59
- console.log(` Input: ${test.input.substring(0, 50)}${test.input.length > 50 ? '...' : ''}`);
60
-
61
- // Simple validation checks
62
- if (test.input.includes('{% extends') && test.input.indexOf('{% extends') > 0) {
63
- const firstNonWhitespace = test.input.match(/^\s*({%)/);
64
- if (firstNonWhitespace && firstNonWhitespace.index > 0) {
65
- console.log(` PASS: Detected extends not first`);
66
- passed++;
67
- }
68
- }
69
-
70
- console.log(' PASS');
71
- passed++;
72
- } catch (err) {
73
- console.log(` ERROR: ${err.message}`);
74
- failed++;
75
- }
76
- });
77
-
78
- console.log(`\n========================================`);
79
- console.log(`Tests: ${passed} passed, ${failed} failed`);
80
- console.log(`========================================`);
81
-
82
- process.exit(failed > 0 ? 1 : 0);
package/mkdocs.yml DELETED
@@ -1,195 +0,0 @@
1
- site_name: miki-template
2
- site_url: https://alainmiki.github.io/miki-template/
3
- site_description: Django-style template engine for Node.js and Express
4
- site_author: Alain Miki
5
-
6
- repo_name: miki-template
7
- repo_url: https://github.com/alainmiki/miki-template
8
- edit_uri: edit/main/docs/
9
-
10
- theme:
11
- name: material
12
- custom_dir: overrides
13
- logo: assets/logo.png
14
- favicon: assets/logo.png
15
- palette:
16
- - media: "(prefers-color-scheme: light)"
17
- scheme: default
18
- primary: custom
19
- accent: custom
20
- toggle:
21
- icon: material/brightness-7
22
- name: Switch to dark mode
23
- - media: "(prefers-color-scheme: dark)"
24
- scheme: custom
25
- primary: custom
26
- accent: custom
27
- toggle:
28
- icon: material/brightness-4
29
- name: Switch to light mode
30
- font:
31
- text: Inter
32
- code: JetBrains Mono
33
- features:
34
- - navigation.instant
35
- - navigation.instant.prefetch
36
- - navigation.instant.progress
37
- - navigation.tracking
38
- - navigation.tabs
39
- - navigation.tabs.sticky
40
- - navigation.sections
41
- - navigation.path
42
- - navigation.top
43
- - navigation.footer
44
- - navigation.prune
45
- - navigation.indexes
46
- - toc.integrate
47
- - toc.follow
48
- - search.suggest
49
- - search.highlight
50
- - content.code.copy
51
- - announce.dismiss
52
- icon:
53
- repo: fontawesome/brands/github
54
- admonition:
55
- note: fontawesome/solid/note-sticky
56
- abstract: fontawesome/solid/book-open
57
- info: fontawesome/solid/circle-info
58
- tip: fontawesome/solid/lightbulb
59
- success: fontawesome/solid/check-circle
60
- question: fontawesome/solid/question-circle
61
- warning: fontawesome/solid/triangle-exclamation
62
- failure: fontawesome/solid/circle-xmark
63
- danger: fontawesome/solid/skull
64
- bug: fontawesome/solid/robot
65
- example: fontawesome/solid/flask
66
- quote: fontawesome/solid/quote-left
67
-
68
- nav:
69
- - Home: index.md
70
- - Getting Started:
71
- - What is miki-template?: guide/what-is-miki-template.md
72
- - Why miki-template?: guide/why-miki-template.md
73
- - Getting Started: guide/getting-started.md
74
- - Installation: guide/installation.md
75
- - Quick Start: guide/quick-start.md
76
- - Core Features:
77
- - Partial Templates: guide/partial-templates.md
78
- - Smart Template Discovery: guide/template-discovery.md
79
- - Template Inheritance: guide/template-inheritance.md
80
- - Filters: guide/filters.md
81
- - Tags: guide/tags.md
82
- - Security: guide/security.md
83
- - Advanced:
84
- - Custom Tags: guide/custom-tags.md
85
- - Custom Filters: guide/custom-filters.md
86
- - Context Processors: guide/context-processors.md
87
- - Async Rendering: guide/async-rendering.md
88
- - Advanced Usage: guide/advanced-usage.md
89
- - API Reference:
90
- - API Overview: api/index.md
91
- - render(): api/render.md
92
- - compile(): api/compile.md
93
- - asyncRender(): api/async-render.md
94
- - renderPartial(): api/render-partial.md
95
- - setupExpress(): api/setup-express.md
96
- - Filters: api/filters.md
97
- - Tags: api/tags.md
98
- - Security: api/security.md
99
- - i18n: api/i18n.md
100
- - Libraries: api/libraries.md
101
- - Cache: api/cache.md
102
- - Finder: api/finder.md
103
- - Helpers: api/helpers.md
104
- - Context Processors: api/context-processors.md
105
- - Integrations:
106
- - Integrations Overview: integrations/index.md
107
- - Express: integrations/express.md
108
- - Koa: integrations/koa.md
109
- - Fastify: integrations/fastify.md
110
- - Hono: integrations/hono.md
111
- - Elysia: integrations/elysia.md
112
- - NestJS: integrations/nestjs.md
113
- - TSDX / TSed: integrations/tsed.md
114
- - Performance: performance.md
115
-
116
- markdown_extensions:
117
- - abbr
118
- - admonition
119
- - attr_list
120
- - def_list
121
- - footnotes
122
- - meta
123
- - toc:
124
- permalink: true
125
- title: On this page
126
- - pymdownx.arithmatex:
127
- generic: true
128
- - pymdownx.betterem:
129
- smart_enable: all
130
- - pymdownx.caret
131
- - pymdownx.details
132
- - pymdownx.emoji:
133
- emoji_index: !!python/name:material.extensions.emoji.twemoji
134
- emoji_generator: !!python/name:material.extensions.emoji.to_svg
135
- - pymdownx.highlight:
136
- anchor_linenums: true
137
- line_spans: __span
138
- pygments_lang_class: true
139
- - pymdownx.inlinehilite
140
- - pymdownx.keys
141
- - pymdownx.mark
142
- - pymdownx.smartsymbols
143
- - pymdownx.superfences:
144
- custom_fences:
145
- - name: mermaid
146
- class: mermaid
147
- format: !!python/name:pymdownx.superfences.fence_code_format
148
- - pymdownx.tabbed:
149
- alternate_style: true
150
- - pymdownx.tasklist:
151
- custom_checkbox: true
152
- - pymdownx.tilde
153
-
154
- extra:
155
- social:
156
- - icon: fontawesome/brands/github
157
- link: https://github.com/alainmiki/miki-template
158
- name: miki-template on GitHub
159
- - icon: fontawesome/brands/npm
160
- link: https://www.npmjs.com/package/miki-template
161
- name: miki-template on npm
162
- - icon: fontawesome/brands/youtube
163
- link: https://youtube.com/@codewithmiki6849
164
- name: Code with Miki on YouTube
165
- - icon: fontawesome/brands/facebook
166
- link: https://www.facebook.com/profile.php?id=100063798107667
167
- name: Alain Miki on Facebook
168
- - icon: fontawesome/brands/instagram
169
- link: https://www.instagram.com/alain_miki
170
- name: Alain Miki on Instagram
171
- - icon: fontawesome/brands/facebook
172
- link: https://www.facebook.com/codewithmiki
173
- name: Code with Miki on Facebook
174
- version:
175
- provider: mike
176
- homepage: https://alainmiki.github.io/miki-template/
177
- generator: false
178
- annotate:
179
- json: [.s2s]
180
-
181
- plugins:
182
- - search:
183
- separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
184
- - tags
185
- - meta
186
- - offline:
187
- enabled: !ENV [READTHEDOCS, false]
188
- - social:
189
- cards: true
190
- cards_layout_options:
191
- color: "#1a1a2e"
192
- font_family: Roboto
193
- - optimize:
194
- enabled: !ENV [READTHEDOCS, false]
195
- concurrency: 4
@@ -1,26 +0,0 @@
1
- {% extends "base.html" %}
2
-
3
- {% block announce %}
4
- <div class="md-announce" role="banner">
5
- <div class="md-announce__inner">
6
- <span>🚀 <strong>miki-template v2.3.1</strong> is now available with improved performance and new features!</span>
7
- <a href="https://github.com/alainmiki/miki-template/releases" target="_blank" rel="noopener">View Release Notes</a>
8
- <button class="md-announce__button" onclick="this.closest('.md-announce').remove()" aria-label="Dismiss announcement">
9
- <span class="md-icon">&#10005;</span>
10
- </button>
11
- </div>
12
- </div>
13
- {% endblock %}
14
-
15
- {% block extrahead %}
16
- <meta name="theme-color" content="#1a1a2e">
17
- <meta name="description" content="Django-style template magic for Node.js — blazing fast partials, smart template discovery, and zero friction for HTMX.">
18
- <meta property="og:title" content="miki-template - Django-style templating for Node.js">
19
- <meta property="og:description" content="Blazing fast partials, smart template discovery, and zero friction for HTMX. Bring Django's beloved template language to Node.js and Express.">
20
- <meta property="og:type" content="website">
21
- <meta property="og:url" content="https://alainmiki.github.io/miki-template/">
22
- <meta property="og:image" content="https://alainmiki.github.io/miki-template/social-card.png">
23
- <meta name="twitter:card" content="summary_large_image">
24
- <meta name="twitter:title" content="miki-template - Django-style templating for Node.js">
25
- <meta name="twitter:description" content="Blazing fast partials, smart template discovery, and zero friction for HTMX.">
26
- {% endblock %}
@@ -1,2 +0,0 @@
1
- mkdocs-material[imaging]<9.8
2
- mkdocs<2