forked from Nitrokey/dongleauth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
46 lines (38 loc) · 879 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
39
40
41
42
43
44
45
46
# frozen_string_literal: true
require 'html-proofer'
require 'rubocop/rake_task'
require 'jekyll'
require 'jsonlint/rake_task'
task default: %w[proof verify jsonlint rubocop]
task :build do
config = Jekyll.configuration(
'source' => './',
'destination' => './_site'
)
site = Jekyll::Site.new(config)
Jekyll::Commands::Build.build site, config
end
task proof: 'build' do
HTMLProofer.check_directory(
'./_site', \
assume_extension: true, \
check_html: true, \
disable_external: true
).run
end
task proof_external: 'build' do
HTMLProofer.check_directory(
'./_site', \
assume_extension: true, \
check_html: true, \
cache: { timeframe: '1w' }, \
hydra: { max_concurrency: 12 }
).run
end
JsonLint::RakeTask.new do |t|
t.paths = %w[_site/data.json]
end
task :verify do
ruby './verify.rb'
end
RuboCop::RakeTask.new