forked from gjtorikian/html-proofer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
30 lines (21 loc) · 623 Bytes
/
Rakefile
File metadata and controls
30 lines (21 loc) · 623 Bytes
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
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop)
task default: %i(spec proof_readme)
task :proof_readme do
require 'html-proofer'
require 'redcarpet'
renderer = Redcarpet::Render::HTML.new \
with_toc_data: true
redcarpet = Redcarpet::Markdown.new(renderer)
html = redcarpet.render File.read('README.md')
mkdir_p 'out'
File.write('out/README.html', html)
opts = {
url_ignore: [/badge.fury.io/, /codecov.io/]
}
HTMLProofer.check_directory('./out', opts).run
end