webpack_rails 1.2.1 → 1.2.2
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/webpack_rails/package.json +1 -1
- data/lib/webpack_rails/processor.rb +5 -1
- 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: c8a4638363fca1c08bc4337d8bd03098575a9c9d
|
4
|
+
data.tar.gz: cb384563ac4327c7eae97485482de7e42ab5f249
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c4f84dca4623c7dab8922a29f61d46022d0ce0ed8a2765033457b15bded3e5db59f5e491402b53291feb96e530036c1e91ed9775cca7c55c38d5929077859a0
|
7
|
+
data.tar.gz: a49e09b788c050c2853a469b9a5121bcf55f93b099578de99ab01d03918dc8a264e5f7cc65859822e961bf78f5e4e95b0abf75f471989d4619d79fd4762c7364
|
@@ -23,6 +23,10 @@ module WebpackRails
|
|
23
23
|
contents.gsub(/['"]\$asset_path\/([^'"]+?)['"]/) {|s| "'#{context.asset_path($1)}'" }
|
24
24
|
end
|
25
25
|
|
26
|
+
def dependable_asset(filepath)
|
27
|
+
File.file?(filepath) # ignore non-filepath entries
|
28
|
+
end
|
29
|
+
|
26
30
|
def evaluate(context, locals)
|
27
31
|
return data unless context.pathname.to_s.include?('.bundle')
|
28
32
|
|
@@ -32,7 +36,7 @@ module WebpackRails
|
|
32
36
|
|
33
37
|
# add webpack bundle dependencies as sprockets dependencies for this file
|
34
38
|
result[:modules].map do |m|
|
35
|
-
context.depend_on(m) if m
|
39
|
+
context.depend_on(m) if dependable_asset(m)
|
36
40
|
end
|
37
41
|
|
38
42
|
file_contents = context.pathname.open.read # reload file contents after build
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpack_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
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-11-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: node_task
|