rails_jskit 5.0.1 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/jskit/install/install_generator.rb +18 -3
- 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: a15f3760d8c6e81a5ac1c0ffd2344c9201881cf3
|
4
|
+
data.tar.gz: 38b50b8168b5e20d38023fb5686dde1c08727ffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d926442464ed5aad88ec72dc60396491dddc28ba3410ea5394560c996b98bec35770a99a9c39ea671f7b3ed6d846feeb1175e2a9c6c7135d73ff78369ae93ee
|
7
|
+
data.tar.gz: db51a062072c0768ec026976656c3e6ec30bc072442d375a59d3b1e1b9a576ad79092a007f7eae312d75fb6d71012508c9abf8d167826c982f7c7e79c873e4fe
|
@@ -54,7 +54,12 @@ module Jskit
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def body_indentation
|
57
|
-
|
57
|
+
if layout_file_content.match(/^(\s+)%body/)
|
58
|
+
indentation = layout_file_content.match(/^(\s+)%body/)[1]
|
59
|
+
else
|
60
|
+
indentation = ""
|
61
|
+
end
|
62
|
+
"#{indentation} "
|
58
63
|
end
|
59
64
|
|
60
65
|
def layout_file
|
@@ -77,10 +82,20 @@ module Jskit
|
|
77
82
|
"app/assets/javascripts/application.js"
|
78
83
|
end
|
79
84
|
|
80
|
-
|
85
|
+
def manifest?
|
86
|
+
File.exists? js_manifest
|
87
|
+
end
|
88
|
+
|
89
|
+
def require_tree?
|
90
|
+
!!application_js.match(/\/\/= require_tree \./)
|
91
|
+
end
|
92
|
+
|
93
|
+
def rails_jskit?
|
94
|
+
!!application_js.match(/\/\/= require rails_jskit/)
|
95
|
+
end
|
81
96
|
|
82
97
|
def application_js
|
83
|
-
|
98
|
+
File.read js_manifest
|
84
99
|
end
|
85
100
|
end
|
86
101
|
end
|