sewing_kit 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sewing_kit/version.rb +1 -1
- data/lib/sewing_kit/webpack/helper.rb +6 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd6d8566a1e5aa23a61ab09d05db586b8796980c
|
4
|
+
data.tar.gz: e57000e3f5a067a4d9df4b952a3080f40886dc63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 540507d95a28fe65b2321c489c561465e4bf2898e7d2335ecc904da113339dac63c14682f41da2ce4bf489b07ece61ded91706772c3cbf3ce67178ca33a0239f
|
7
|
+
data.tar.gz: c2ab65ce4396c1c93e5c3cf90206ed8c8e780a507f2ea20cb5f49099446d53650ac33f66c1947eda384bf11e047e40b7e8808b509b77b42123cdcf572ecc0120
|
data/lib/sewing_kit/version.rb
CHANGED
@@ -12,7 +12,7 @@ module SewingKit
|
|
12
12
|
|
13
13
|
def sewing_kit_asset_paths(source, extension: 'js')
|
14
14
|
return '' unless source.present?
|
15
|
-
return '/webpack/assets/dll/vendor.js' if serve_development_asests && 'vendor' == source && extension == 'js'
|
15
|
+
return '/webpack/assets/dll/vendor.js' if serve_development_asests? && 'vendor' == source && extension == 'js'
|
16
16
|
|
17
17
|
paths = SewingKit::Webpack::Manifest.asset_paths(source)
|
18
18
|
return '' unless paths[extension]
|
@@ -21,7 +21,7 @@ module SewingKit
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def sewing_kit_link_tag(*paths)
|
24
|
-
return '' unless serve_compiled_assets
|
24
|
+
return '' unless serve_compiled_assets?
|
25
25
|
|
26
26
|
options = paths.extract_options!
|
27
27
|
|
@@ -79,12 +79,13 @@ module SewingKit
|
|
79
79
|
path.rpartition('-').last.split('.').first
|
80
80
|
end
|
81
81
|
|
82
|
-
def serve_compiled_assets
|
82
|
+
def serve_compiled_assets?
|
83
83
|
Rails.env.production? || ENV['SK_SIMULATE_PRODUCTION'] == '1'
|
84
84
|
end
|
85
85
|
|
86
|
-
def serve_development_asests
|
87
|
-
|
86
|
+
def serve_development_asests?
|
87
|
+
return false if serve_compiled_assets?
|
88
|
+
Rails.env.development?
|
88
89
|
end
|
89
90
|
end
|
90
91
|
end
|