condenser-rails 0.0.8 → 0.0.9
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/lib/condenser/rails/version.rb +1 -1
- data/lib/condenser/railtie.rb +13 -2
- 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: bbcf380120b7098587a900eb941ae4191fa43f7d9f8e5a09ac497a43dc4f32f1
|
4
|
+
data.tar.gz: cfcc292898bf9dda83d508edb9c9d9635383ece874ac153057b7bb8aa5fb27a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c529f830ad5484b9df6a0f0c9ea588abf1dbfe983a2de98d171c5c1d35e20821133f18963cbfee47336f7f01133a68e9c32ece8a87afcc1fce83be2717f2339
|
7
|
+
data.tar.gz: 227f34f7567f6473c19a75f5616d343e56502d10e502247e74da246c892b36ab6cacd99e040e7f567107adc6125685968b2da5d3f6cffe4f518577a8dbc59455
|
data/lib/condenser/railtie.rb
CHANGED
@@ -142,7 +142,7 @@ class Condenser::Railtie < ::Rails::Railtie
|
|
142
142
|
::Rails.logger.warn "Application uninitialized: Try calling YourApp::Application.initialize!"
|
143
143
|
end
|
144
144
|
|
145
|
-
env = Condenser.new(pipeline: false)
|
145
|
+
env = Condenser.new(pipeline: false, logger: ::Rails.logger)
|
146
146
|
config = app.config
|
147
147
|
|
148
148
|
# Run app.assets.configure blocks
|
@@ -156,7 +156,18 @@ class Condenser::Railtie < ::Rails::Railtie
|
|
156
156
|
|
157
157
|
# Set compressors after the configure blocks since they can
|
158
158
|
# define new compressors and we only accept existent compressors.
|
159
|
-
env
|
159
|
+
if ::Rails.env == 'development'
|
160
|
+
env.register_preprocessor 'application/javascript', Condenser::BabelProcessor.new({
|
161
|
+
plugins: [
|
162
|
+
["#{Condenser::BabelProcessor.node_modules_path}/babel-plugin-transform-class-extended-hook", {}],
|
163
|
+
["#{Condenser::BabelProcessor.node_modules_path}/@babel/plugin-proposal-class-properties", {}]
|
164
|
+
],
|
165
|
+
presets: nil
|
166
|
+
})
|
167
|
+
else
|
168
|
+
env.register_preprocessor 'application/javascript', Condenser::BabelProcessor.new()
|
169
|
+
end
|
170
|
+
|
160
171
|
env.register_exporter 'application/javascript', Condenser::RollupProcessor
|
161
172
|
|
162
173
|
env.register_minifier 'application/javascript', resolve_minifier(config.assets.js_minifier) if config.assets.js_minifier
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: condenser-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: condenser
|
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
170
|
- !ruby/object:Gem::Version
|
171
171
|
version: '0'
|
172
172
|
requirements: []
|
173
|
-
rubygems_version: 3.
|
173
|
+
rubygems_version: 3.1.2
|
174
174
|
signing_key:
|
175
175
|
specification_version: 4
|
176
176
|
summary: Condenser integration for Rails
|