ruby2js 4.1.7 → 4.2.0
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/bin/ruby2js +4 -0
- data/demo/ruby2js.rb +677 -0
- data/lib/ruby2js/converter/return.rb +1 -1
- data/lib/ruby2js/demo.rb +28 -0
- data/lib/ruby2js/filter/esm.rb +28 -14
- data/lib/ruby2js/filter/lit-element.rb +2 -218
- data/lib/ruby2js/filter/lit.rb +290 -0
- data/lib/ruby2js/filter/react.rb +11 -4
- data/lib/ruby2js/version.rb +2 -2
- data/lib/tasks/install/{litelement.rb → lit-webpacker.rb} +2 -2
- data/lib/tasks/install/stimulus-rollup.rb +2 -1
- data/lib/tasks/ruby2js_tasks.rake +13 -1
- data/ruby2js.gemspec +3 -1
- metadata +9 -5
@@ -11,7 +11,7 @@ namespace :ruby2js do
|
|
11
11
|
namespace :install do
|
12
12
|
desc "Install Ruby2JS with LitElement support"
|
13
13
|
task :litelement do
|
14
|
-
template 'install/
|
14
|
+
template 'install/lit-webpacker.rb'
|
15
15
|
end
|
16
16
|
|
17
17
|
desc "Install Ruby2JS with Preact support"
|
@@ -36,6 +36,18 @@ namespace :ruby2js do
|
|
36
36
|
template 'install/stimulus-webpacker.rb'
|
37
37
|
end
|
38
38
|
end
|
39
|
+
|
40
|
+
namespace :lit do
|
41
|
+
desc "Install Ruby2JS with Lit Rollup support"
|
42
|
+
task :rollup do
|
43
|
+
template 'install/lit-rollup.rb'
|
44
|
+
end
|
45
|
+
|
46
|
+
desc "Install Ruby2JS with Lit Webpacker support"
|
47
|
+
task :webpacker do
|
48
|
+
template 'install/lit-webpacker.rb'
|
49
|
+
end
|
50
|
+
end
|
39
51
|
end
|
40
52
|
end
|
41
53
|
|
data/ruby2js.gemspec
CHANGED
@@ -12,12 +12,14 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.authors = ["Sam Ruby".freeze, "Jared White".freeze]
|
13
13
|
s.description = " The base package maps Ruby syntax to JavaScript semantics.\n Filters may be provided to add Ruby-specific or framework specific\n behavior.\n".freeze
|
14
14
|
s.email = "rubys@intertwingly.net".freeze
|
15
|
-
s.files = %w(ruby2js.gemspec README.md) + Dir.glob("{lib}/**/*")
|
15
|
+
s.files = %w(ruby2js.gemspec README.md bin/ruby2js demo/ruby2js.rb) + Dir.glob("{lib}/**/*")
|
16
16
|
s.homepage = "http://github.com/rubys/ruby2js".freeze
|
17
17
|
s.licenses = ["MIT".freeze]
|
18
18
|
s.required_ruby_version = Gem::Requirement.new(">= 2.3".freeze)
|
19
19
|
s.summary = "Minimal yet extensible Ruby to JavaScript conversion.".freeze
|
20
20
|
|
21
|
+
s.executables << 'ruby2js'
|
22
|
+
|
21
23
|
s.add_dependency('parser')
|
22
24
|
s.add_dependency('regexp_parser', '~> 2.1.1')
|
23
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby2js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-10-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: parser
|
@@ -44,11 +44,14 @@ description: |2
|
|
44
44
|
Filters may be provided to add Ruby-specific or framework specific
|
45
45
|
behavior.
|
46
46
|
email: rubys@intertwingly.net
|
47
|
-
executables:
|
47
|
+
executables:
|
48
|
+
- ruby2js
|
48
49
|
extensions: []
|
49
50
|
extra_rdoc_files: []
|
50
51
|
files:
|
51
52
|
- README.md
|
53
|
+
- bin/ruby2js
|
54
|
+
- demo/ruby2js.rb
|
52
55
|
- lib/ruby2js.rb
|
53
56
|
- lib/ruby2js/cgi.rb
|
54
57
|
- lib/ruby2js/converter.rb
|
@@ -137,6 +140,7 @@ files:
|
|
137
140
|
- lib/ruby2js/filter/jquery.rb
|
138
141
|
- lib/ruby2js/filter/jsx.rb
|
139
142
|
- lib/ruby2js/filter/lit-element.rb
|
143
|
+
- lib/ruby2js/filter/lit.rb
|
140
144
|
- lib/ruby2js/filter/matchAll.rb
|
141
145
|
- lib/ruby2js/filter/minitest-jasmine.rb
|
142
146
|
- lib/ruby2js/filter/node.rb
|
@@ -161,7 +165,7 @@ files:
|
|
161
165
|
- lib/tasks/README.md
|
162
166
|
- lib/tasks/install/app/javascript/elements/index.js
|
163
167
|
- lib/tasks/install/config/webpack/loaders/ruby2js.js
|
164
|
-
- lib/tasks/install/
|
168
|
+
- lib/tasks/install/lit-webpacker.rb
|
165
169
|
- lib/tasks/install/preact.rb
|
166
170
|
- lib/tasks/install/react.rb
|
167
171
|
- lib/tasks/install/stimulus-rollup.rb
|
@@ -190,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
194
|
- !ruby/object:Gem::Version
|
191
195
|
version: '0'
|
192
196
|
requirements: []
|
193
|
-
rubygems_version: 3.1.
|
197
|
+
rubygems_version: 3.1.4
|
194
198
|
signing_key:
|
195
199
|
specification_version: 4
|
196
200
|
summary: Minimal yet extensible Ruby to JavaScript conversion.
|