condenser-rails 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: baa099c52f0a3c21933bed508e7b912d8dfa2314ba57d3f8ee790a01f9608aa3
4
- data.tar.gz: ed5e75bf4e37f04d67e379dd43c5c50c9db1004712071cdc291eb2082abe6eeb
3
+ metadata.gz: bbcf380120b7098587a900eb941ae4191fa43f7d9f8e5a09ac497a43dc4f32f1
4
+ data.tar.gz: cfcc292898bf9dda83d508edb9c9d9635383ece874ac153057b7bb8aa5fb27a9
5
5
  SHA512:
6
- metadata.gz: 0d8257facbf89af90fce66fff188cace024aeddb15949ee11d49b52c7c9c7562e6c3801b3f6772e7c0783fe1d3b4d75e95fd6ef461571a19e395fbfe44a0ae4d
7
- data.tar.gz: 1f8646f667ebfbfc502d461b50d55fbac34a97e1f7194e4d08e08a04572c94e29957af05a497cfca4aec982f0852ebf301b6009d44299b643263ed891e73644a
6
+ metadata.gz: 5c529f830ad5484b9df6a0f0c9ea588abf1dbfe983a2de98d171c5c1d35e20821133f18963cbfee47336f7f01133a68e9c32ece8a87afcc1fce83be2717f2339
7
+ data.tar.gz: 227f34f7567f6473c19a75f5616d343e56502d10e502247e74da246c892b36ab6cacd99e040e7f567107adc6125685968b2da5d3f6cffe4f518577a8dbc59455
@@ -1,5 +1,5 @@
1
1
  class Condenser
2
2
  module Rails
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
@@ -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.register_preprocessor 'application/javascript', Condenser::BabelProcessor
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.8
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-01-07 00:00:00.000000000 Z
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.0.3
173
+ rubygems_version: 3.1.2
174
174
  signing_key:
175
175
  specification_version: 4
176
176
  summary: Condenser integration for Rails