papercraft 1.3 → 2.13
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +93 -0
- data/README.md +246 -617
- data/lib/papercraft/compiler/nodes.rb +223 -0
- data/lib/papercraft/compiler/tag_translator.rb +93 -0
- data/lib/papercraft/compiler.rb +657 -201
- data/lib/papercraft/proc_ext.rb +118 -0
- data/lib/papercraft/template.rb +16 -195
- data/lib/papercraft/version.rb +1 -1
- data/lib/papercraft.rb +113 -89
- metadata +11 -64
- data/lib/papercraft/compiler_old.rb +0 -701
- data/lib/papercraft/extension_proxy.rb +0 -41
- data/lib/papercraft/extensions/soap.rb +0 -42
- data/lib/papercraft/html.rb +0 -173
- data/lib/papercraft/json.rb +0 -128
- data/lib/papercraft/renderer.rb +0 -190
- data/lib/papercraft/tags.rb +0 -408
- data/lib/papercraft/xml.rb +0 -47
- data/lib/tilt/papercraft.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56eed644cb59fa526aaa4a540854d36456c812e3d697f3c26cf64b57b26ff124
|
4
|
+
data.tar.gz: e5f93cffebceb83199cb08ae7dc7d442bb2cd40118839bfee194be0fbd55db5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f352689a65bba3879698cccd8ab7650ad74213403a9f4cf5a6dacbb1414a62c8f9052277fbbdca0d107e9fd748d43ea77432a822ef2ad55981ad39277e551d78
|
7
|
+
data.tar.gz: 387558f9b1a32ca905621e8823e6f2b25160dc4270ba549ef9e3f1d889401314b2737fa82a9fa79417249a0e2621e76824eabe08d11da88534c1af08506d49a9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,96 @@
|
|
1
|
+
# 2.13 2025-09-11
|
2
|
+
|
3
|
+
- Pass level to HTML debug attribute injection proc
|
4
|
+
|
5
|
+
# 2.12 2025-09-11
|
6
|
+
|
7
|
+
- Add support for injecting location attributes into HTML tags (for debug purposes)
|
8
|
+
|
9
|
+
# 2.11 2025-09-11
|
10
|
+
|
11
|
+
- Add mode param to `Papercraft::Template` wrapper class
|
12
|
+
|
13
|
+
# 2.10 2025-09-11
|
14
|
+
|
15
|
+
- Add support for rendering XML, implement `Proc#render_xml`
|
16
|
+
- Fix handling of literal strings with double quotes
|
17
|
+
- Improve error handling for `Papercraft::Error` exceptions
|
18
|
+
|
19
|
+
# 2.9 2025-09-02
|
20
|
+
|
21
|
+
- Tweak generated code to incorporate @byroot's
|
22
|
+
[recommendations](https://www.reddit.com/r/ruby/comments/1mtj7bx/comment/n9ckbvt/):
|
23
|
+
- Remove call to to_s coercion before calling html_escape
|
24
|
+
- Chain calls to `#<<` with emitted HTML parts
|
25
|
+
|
26
|
+
# 2.8 2025-08-17
|
27
|
+
|
28
|
+
- Add `#render_children` builtin
|
29
|
+
- Rename `#emit_yield` to `#render_yield`
|
30
|
+
- Add `Proc#render_cached` for caching render result
|
31
|
+
|
32
|
+
# 2.7 2025-08-17
|
33
|
+
|
34
|
+
- Improve source maps and whitespace in compiled code
|
35
|
+
- Minor improvements to emit_yield generated code
|
36
|
+
- Add support for extensions
|
37
|
+
|
38
|
+
# 2.6 2025-08-16
|
39
|
+
|
40
|
+
- Add support for block invocation
|
41
|
+
|
42
|
+
# 2.5 2025-08-15
|
43
|
+
|
44
|
+
- Translate backtrace for exceptions raised in `#render_to_buffer`
|
45
|
+
- Improve display of backtrace when source map is missing entries
|
46
|
+
- Improve handling of ArgumentError raised on calling the template
|
47
|
+
- Add `Template#apply`, `Template#compiled_proc` methods
|
48
|
+
|
49
|
+
# 2.4 2025-08-10
|
50
|
+
|
51
|
+
- Add Papercraft::Template wrapper class
|
52
|
+
|
53
|
+
# 2.3 2025-08-10
|
54
|
+
|
55
|
+
- Fix whitespace issue in visit_yield_node
|
56
|
+
- Reimplement and optimize exception backtrace translation
|
57
|
+
- Minor improvement to code generation
|
58
|
+
|
59
|
+
# 2.2 2025-08-09
|
60
|
+
|
61
|
+
- Update docs
|
62
|
+
- Refactor code
|
63
|
+
|
64
|
+
# 2.1 2025-08-08
|
65
|
+
|
66
|
+
- Optimize output code: directly invoke component templates instead of calling
|
67
|
+
`Papercraft.render_emit_call`. Papercraft is now
|
68
|
+
- Optimize output code: use separate pushes to buffer instead of interpolated
|
69
|
+
strings.
|
70
|
+
- Streamline API: `emit proc` => `render`, `emit str` => `raw`, `emit_markdown`
|
71
|
+
=> `markdown`
|
72
|
+
- Optimize output code: add `frozen_string_literal` to top of compiled code
|
73
|
+
- Add more benchmarks (#1)
|
74
|
+
- Optimize output code: use ERB::Escape.html_escape instead of CGI.escape_html
|
75
|
+
(#2)
|
76
|
+
- Fix source map calculation
|
77
|
+
|
78
|
+
## 2.0.1 2025-08-07
|
79
|
+
|
80
|
+
- Fix source map calculation
|
81
|
+
|
82
|
+
## 2.0 2025-08-07
|
83
|
+
|
84
|
+
- Passes all HTML, compilation tests from Papercraft
|
85
|
+
- Automatic compilation
|
86
|
+
- Plain procs/lambdas as templates
|
87
|
+
- Remove everything not having to do with HTML
|
88
|
+
- Papercraft: compiled functional templates - they're super fast!
|
89
|
+
|
90
|
+
## 1.4 2025-01-09
|
91
|
+
|
92
|
+
- Compiler: add support defer
|
93
|
+
|
1
94
|
## 1.3 2024-12-16
|
2
95
|
|
3
96
|
- Update dependencies
|