-
Notifications
You must be signed in to change notification settings - Fork 0
/
Guardfile
59 lines (55 loc) · 1.99 KB
/
Guardfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# frozen_string_literal: true
group :red_green_refactor, halt_on_fail: true do
guard "process",
# NOTE: Specificity on what HTML files is needed here otherwise
# Jekyll-generated files under the _site/ directory get linted
# and htmllint has a sad. Also, only lint files that I have direct
# control over and are not theme override files.
# command: ["htmllint", "_includes/*.html"],
command: [
"htmllint",
"_includes/japanese/*",
"_includes/ruby/*",
"_includes/audio-narration-banner.html",
"_includes/audio-profile-custom-links.html",
"_includes/japanese.html",
"_includes/ruby.html",
"_includes/signup-form.html",
"_includes/stripped_markdown.html",
],
name: "htmllint" do
watch(%r{\A_includes/.+\.html\z})
end
guard "process",
command: ["markdownlint", "_posts", "_drafts", "_pages" "README.md"],
name: "markdownlint" do
watch(%r{\A_posts/.+\.md\z})
watch(%r{\A_pages/.+\.md\z})
watch(%r{\A.+\.md\z})
end
guard "process",
command: ["sass-lint", "--verbose", "--no-exit"],
name: "sass-lint" do
watch(%r{\A_sass/.+\.scss\z})
watch(%r{\Aassets/.+\.scss\z})
end
# NOTE: This guard doesn't really seem to play nicely with the other guards
# so just ensure that before commiting, you run the following command:
# bundle exec htmlproofer _site --allow-hash-href --assume-extension --url-ignore "/localhost/" --http-status-ignore "999"
# The above command will be run in CI.
# See: https://github.com/gjtorikian/html-proofer#using-with-jekyll
# guard "process",
# command: [
# "htmlproofer",
# "_site",
# "--allow-hash-href",
# "--assume-extension",
# "--url-ignore",
# "/localhost/",
# "--http-status-ignore",
# "'999'"
# ],
# name: "htmlproofer" do
# watch(%r{\A_site/.+\.html\z})
# end
end