theme-check 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/theme_check/checks/missing_required_template_files.rb +12 -12
- data/lib/theme_check/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e51f58be8347c6d602ef2f5f6385117f1c8ad5d07a66c111c8c8bf623008f3b1
|
4
|
+
data.tar.gz: 88eb1fbc392ff70251255f5aa681e6e7bf37fbc1c0a65bc1651e291c13baf5d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c7865cb5cb44da5811b78429d34c3309264ba21f55954a83b97784e15375798794461c0d19edfe620e8cbed45b6b8a80d63755b258505acb4c2b61bbae77e4a
|
7
|
+
data.tar.gz: 625963de20e85bc5b27989fba14a9a8243aafffc21aba5f4ea54b8e937fba05f73df99549a6b6b575dd29b7df48319c054aa2089e98c31e1e8212b1521c73c04
|
@@ -9,21 +9,21 @@ module ThemeCheck
|
|
9
9
|
category :liquid
|
10
10
|
doc "https://shopify.dev/docs/themes/theme-templates"
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
REQUIRED_LIQUID_FILES = %w(layout/theme)
|
13
|
+
REQUIRED_TEMPLATE_FILES = %w(
|
14
|
+
index product collection cart blog article page list-collections search 404
|
15
|
+
gift_card customers/account customers/activate_account customers/addresses
|
16
|
+
customers/login customers/order customers/register customers/reset_password password
|
17
|
+
)
|
16
18
|
.map { |file| "templates/#{file}" }
|
17
19
|
|
18
20
|
def on_end
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
def add_missing_file_offense(file)
|
26
|
-
add_offense("Theme is missing '#{file}.liquid' file")
|
21
|
+
(REQUIRED_LIQUID_FILES - theme.liquid.map(&:name)).each do |file|
|
22
|
+
add_offense("'#{file}.liquid' is missing")
|
23
|
+
end
|
24
|
+
(REQUIRED_TEMPLATE_FILES - (theme.liquid + theme.json).map(&:name)).each do |file|
|
25
|
+
add_offense("'#{file}.liquid' or '#{file}.json' is missing")
|
26
|
+
end
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
data/lib/theme_check/version.rb
CHANGED