webpack_rails 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: e009f00ab01652e47f2ca1462e8e61e3ee41c95c
4
- data.tar.gz: e592fb608d969c6895979ae2d58383ba922697ad
3
+ metadata.gz: 94db163f3dd7211fe8a4448cebe146d2da8444f2
4
+ data.tar.gz: 583bc5a7877aa766ac8be90e89ed08a32bbf71b3
5
5
  SHA512:
6
- metadata.gz: c365e87525fd250af593a13b3e1a8bfcaf7866a4930a84483bd28f802e3d35505b8d134138c92414b71815e0f50e86705c4440d47f52dec3c68df5101864d3b4
7
- data.tar.gz: 04f589ed5015256957a7fb347b3671d8d984df7a7eda77a749b62a548f1609cd1b00208aee91210830ffc3d1f141746cca7614ced290b63e44adf1cd8ae0b415
6
+ metadata.gz: 09c5915dc7d08bf0ee20454a705668cdf763474010e6e220794d0cef5affcaeee196b8c14cc7f5c5c71971923a35067b6ebe75be55bd9bf23b5e4b6b80af4921
7
+ data.tar.gz: 12983a42d2d14ffc73f249d9afa7c25aaa63f6fed1d7d9172bf8311aaba3de477015202a854377339f8312b0c85dff9b96dc7caede640800006903995b276cec
@@ -0,0 +1,15 @@
1
+ require 'sprockets'
2
+ require 'sprockets/index'
3
+
4
+ module Sprockets
5
+ class WebpackIndex < Index
6
+ def find_asset(*args)
7
+ if @environment.webpack_task_config[:dev_server] || @environment.webpack_task_config[:watch]
8
+ # ensure webpack-dev-server is running or watcher has finished building
9
+ WebpackRails::Task.run_webpack(@environment.webpack_task_config)
10
+ end
11
+
12
+ super
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webpack_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Friend
@@ -44,6 +44,7 @@ executables: []
44
44
  extensions: []
45
45
  extra_rdoc_files: []
46
46
  files:
47
+ - lib/sprockets/webpack_index.rb
47
48
  - lib/webpack_rails.rb
48
49
  - lib/webpack_rails/ErrorMessagePlugin.js
49
50
  - lib/webpack_rails/engine.rb