ejx 0.2 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ejx/template.rb +1 -1
- data/lib/ejx/template/base.rb +1 -1
- data/lib/ejx/template/subtemplate.rb +1 -1
- data/lib/ejx/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dc481f36010e82885f2b6ea60a4f13bb4e6c9c4b823ee6899fd02ce12650942
|
4
|
+
data.tar.gz: 7262002c9a7cb0b3ce87def1d77911e45d6a3e85dde2ae4bfe3fa41aff0f7741
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58f1139b43dcf0205a43619b0f167460d27bd5a75b1708cb4b9497887b8696c7aa5489df61ac89da4e17b3df22a460d3b9fa4ca2f8ce2e5ed6b5fa6c30ca41a4
|
7
|
+
data.tar.gz: 8cd338246eb063e0156504252c83216fc003f507af94655b3f383984e98831ff5e01ddcc669d6c80e85fa84b8a47888170c97e1ccf11e28b0a80be6f23606142
|
data/lib/ejx/template.rb
CHANGED
@@ -69,7 +69,7 @@ class EJX::Template
|
|
69
69
|
subtemplate.children << pm.strip
|
70
70
|
@tree.last.children << subtemplate
|
71
71
|
@stack.pop
|
72
|
-
elsif
|
72
|
+
elsif pm.match(/function\s*\([^\)]*\)\s*\{\s*\Z/m) || pm.match(/=>\s*\{\s*\Z/m)
|
73
73
|
@tree << EJX::Template::Subtemplate.new(pm.strip, [open_modifier, close_modifier].compact)
|
74
74
|
@stack.pop
|
75
75
|
else
|
data/lib/ejx/template/base.rb
CHANGED
@@ -12,7 +12,7 @@ class EJX::Template::Base
|
|
12
12
|
var_generator = EJX::Template::VarGenerator.new
|
13
13
|
|
14
14
|
output = if @escape
|
15
|
-
"import {" + @escape.split('.').reverse.join(" as
|
15
|
+
"import {" + @escape.split('.').reverse.join(" as __ejx_append} from '") + "';\n"
|
16
16
|
else
|
17
17
|
"import {append as __ejx_append} from 'ejx';\n"
|
18
18
|
end
|
@@ -27,7 +27,7 @@ class EJX::Template::Subtemplate
|
|
27
27
|
|
28
28
|
output << ' '*(indentation+4) << "#{global_output_var}.push(#{output_var});\n";
|
29
29
|
output << ' '*(indentation+4) << "return #{output_var};\n";
|
30
|
-
output << ' '*indentation << @children.last
|
30
|
+
output << ' '*indentation << @children.last.strip.delete_suffix(';')
|
31
31
|
output << ", #{append}, true, __promises, #{global_output_var});\n"
|
32
32
|
|
33
33
|
output
|
data/lib/ejx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ejx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0
|
4
|
+
version: '1.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
|
-
rubygems_version: 3.
|
112
|
+
rubygems_version: 3.2.3
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: EJX Template Compiler
|