sprockets-coffee-react 3.4.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sprockets/coffee-react/engine.rb +11 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0391e9e5bfb326698e0e8bf7b5655642255dbad0
|
4
|
+
data.tar.gz: eb6cb417dc005933e6f0b38dfa040ecb1377a44e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73a7752fd67bb9d918dc9315d4e145e608611701c697a63529258122c34f7454ea677a9088dd5061c95f07480c440f8151863e7690e7ee14bd22b028fd4ee1d6
|
7
|
+
data.tar.gz: d057b1bbba38b286b483d50d865bbf67de6b3abce1b4661d1b1ab0be3437d56a1fade793845a223ad2d2665b9f7880bc061225920092adf82b6905afe030571b
|
@@ -7,22 +7,18 @@ if defined?(Rails)
|
|
7
7
|
class CoffeeReact
|
8
8
|
class Engine < ::Rails::Engine
|
9
9
|
initializer :setup_coffee_react, :after => "sprockets.environment", :group => :all do |app|
|
10
|
+
if app.assets
|
11
|
+
configure_env app.assets
|
12
|
+
else
|
13
|
+
app.config.assets.configure { |env| configure_env env }
|
14
|
+
end
|
15
|
+
end
|
10
16
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
# else
|
17
|
-
# app.assets.register_engine '.coffee', Tilt::CoffeeScriptTemplate
|
18
|
-
# end
|
19
|
-
# end
|
20
|
-
|
21
|
-
# app.assets.register_preprocessor '.coffee', Sprockets::CoffeeReact
|
22
|
-
app.assets.register_preprocessor 'application/javascript', Sprockets::CoffeeReact
|
23
|
-
app.assets.register_postprocessor 'application/javascript', Sprockets::CoffeeReactPostprocessor
|
24
|
-
app.assets.register_engine '.cjsx', Sprockets::CoffeeReactScript
|
25
|
-
app.assets.register_engine '.js.cjsx', Sprockets::CoffeeReactScript
|
17
|
+
def configure_env(env)
|
18
|
+
env.register_preprocessor 'application/javascript', Sprockets::CoffeeReact
|
19
|
+
env.register_postprocessor 'application/javascript', Sprockets::CoffeeReactPostprocessor
|
20
|
+
env.register_engine '.cjsx', Sprockets::CoffeeReactScript
|
21
|
+
env.register_engine '.js.cjsx', Sprockets::CoffeeReactScript
|
26
22
|
end
|
27
23
|
end
|
28
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprockets-coffee-react
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Friend
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coffee-react
|