-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathRakefile
38 lines (35 loc) · 943 Bytes
/
Rakefile
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
require 'html/proofer'
require 'rake/testtask'
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/test*.rb']
t.verbose = true
end
# task :test do
# # Make sure there are no baseurls
# sh 'echo "\n\nbaseurl:\nurl:" >> _config.yml'
# begin
# sh "bundle exec jekyll build"
# rescue Exception => e
# puts e.message
# puts e.backtrace.inspect
# # Remove empty baseurls
# sh 'head -n -4 _config.yml > tmp && mv tmp _config.yml'
# raise "build failed"
# end
# begin
# HTML::Proofer.new("./_site", {
# :disable_external => true,
# :checks_to_ignore => ['ScriptCheck'],
# :empty_alt_ignore => true,
# :verbose => true,
# :href_ignore => ["#"]
# }).run
# rescue Exception => e
# puts e.message
# puts e.backtrace.inspect
# ensure
# # Remove empty baseurls
# sh 'head -n -3 _config.yml > tmp && mv tmp _config.yml'
# end
# end