riot_js-rails 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +9 -1
- data/lib/riot_js/rails/processors/processor.rb +91 -11
- data/lib/riot_js/rails/railtie.rb +8 -6
- data/lib/riot_js/rails/version.rb +1 -1
- data/vendor/assets/javascripts/compiler/brackets.js +7 -5
- data/vendor/assets/javascripts/compiler/compiler.js +129 -102
- data/vendor/assets/javascripts/compiler/parsers.js +129 -169
- data/vendor/assets/javascripts/compiler/parsers/_utils.js +47 -0
- data/vendor/assets/javascripts/compiler/parsers/buble.js +18 -0
- data/vendor/assets/javascripts/compiler/parsers/coffee.js +19 -0
- data/vendor/assets/javascripts/compiler/parsers/es6.js +18 -0
- data/vendor/assets/javascripts/compiler/parsers/jade.js +27 -0
- data/vendor/assets/javascripts/compiler/parsers/less.js +31 -0
- data/vendor/assets/javascripts/compiler/parsers/livescript.js +20 -0
- data/vendor/assets/javascripts/compiler/parsers/pug.js +23 -0
- data/vendor/assets/javascripts/compiler/parsers/sass.js +34 -0
- data/vendor/assets/javascripts/compiler/parsers/scss.js +25 -0
- data/vendor/assets/javascripts/compiler/parsers/stylus.js +26 -0
- data/vendor/assets/javascripts/compiler/parsers/typescript.js +9 -0
- data/vendor/assets/javascripts/compiler/safe-regex.js +19 -0
- data/vendor/assets/javascripts/riot.js +1870 -1876
- metadata +16 -5
- data/lib/riot_js/rails/processors/sprockets_processor_v2.rb +0 -26
- data/lib/riot_js/rails/processors/sprockets_processor_v3.rb +0 -39
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riot_js-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bartosz Jaroszewski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -131,8 +131,6 @@ files:
|
|
131
131
|
- lib/riot_js/rails/processors/compiler.rb
|
132
132
|
- lib/riot_js/rails/processors/processor.rb
|
133
133
|
- lib/riot_js/rails/processors/renderer.rb
|
134
|
-
- lib/riot_js/rails/processors/sprockets_processor_v2.rb
|
135
|
-
- lib/riot_js/rails/processors/sprockets_processor_v3.rb
|
136
134
|
- lib/riot_js/rails/railtie.rb
|
137
135
|
- lib/riot_js/rails/version.rb
|
138
136
|
- riot_js-rails.gemspec
|
@@ -140,6 +138,19 @@ files:
|
|
140
138
|
- vendor/assets/javascripts/compiler/compiler.js
|
141
139
|
- vendor/assets/javascripts/compiler/node_runner.js
|
142
140
|
- vendor/assets/javascripts/compiler/parsers.js
|
141
|
+
- vendor/assets/javascripts/compiler/parsers/_utils.js
|
142
|
+
- vendor/assets/javascripts/compiler/parsers/buble.js
|
143
|
+
- vendor/assets/javascripts/compiler/parsers/coffee.js
|
144
|
+
- vendor/assets/javascripts/compiler/parsers/es6.js
|
145
|
+
- vendor/assets/javascripts/compiler/parsers/jade.js
|
146
|
+
- vendor/assets/javascripts/compiler/parsers/less.js
|
147
|
+
- vendor/assets/javascripts/compiler/parsers/livescript.js
|
148
|
+
- vendor/assets/javascripts/compiler/parsers/pug.js
|
149
|
+
- vendor/assets/javascripts/compiler/parsers/sass.js
|
150
|
+
- vendor/assets/javascripts/compiler/parsers/scss.js
|
151
|
+
- vendor/assets/javascripts/compiler/parsers/stylus.js
|
152
|
+
- vendor/assets/javascripts/compiler/parsers/typescript.js
|
153
|
+
- vendor/assets/javascripts/compiler/safe-regex.js
|
143
154
|
- vendor/assets/javascripts/riot.js
|
144
155
|
- vendor/assets/javascripts/riot_rails.js
|
145
156
|
homepage: https://github.com/bjarosze/riot_js-rails
|
@@ -162,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
173
|
version: '0'
|
163
174
|
requirements: []
|
164
175
|
rubyforge_project:
|
165
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.6.8
|
166
177
|
signing_key:
|
167
178
|
specification_version: 4
|
168
179
|
summary: Muut Riot integration with Rails.
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module RiotJs
|
2
|
-
module Rails
|
3
|
-
class SprocketsProcessor < Tilt::Template
|
4
|
-
|
5
|
-
self.default_mime_type = 'application/javascript'
|
6
|
-
|
7
|
-
def self.register_self(app)
|
8
|
-
app.assets.register_engine '.tag', self
|
9
|
-
end
|
10
|
-
|
11
|
-
def evaluate(context, locals, &block)
|
12
|
-
@context = context
|
13
|
-
process
|
14
|
-
end
|
15
|
-
|
16
|
-
def prepare
|
17
|
-
@data = data
|
18
|
-
end
|
19
|
-
|
20
|
-
def process
|
21
|
-
raise 'Not implemented'
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
module RiotJs
|
2
|
-
module Rails
|
3
|
-
class SprocketsProcessor
|
4
|
-
def self.instance
|
5
|
-
@instance ||= new
|
6
|
-
end
|
7
|
-
|
8
|
-
def self.call(input)
|
9
|
-
instance.call(input)
|
10
|
-
end
|
11
|
-
|
12
|
-
def call(input)
|
13
|
-
prepare(input)
|
14
|
-
data = process
|
15
|
-
|
16
|
-
@context.metadata.merge(data: data)
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.register_self(config)
|
20
|
-
config.assets.configure do |env|
|
21
|
-
opts = { mime_type: 'application/javascript', silence_deprecation: true }
|
22
|
-
env.register_engine '.tag', self, opts
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
def process
|
29
|
-
raise 'Not implemented'
|
30
|
-
end
|
31
|
-
|
32
|
-
def prepare(input)
|
33
|
-
@context = input[:environment].context_class.new(input)
|
34
|
-
@data = input[:data]
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|