-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathRakefile
More file actions
38 lines (30 loc) · 800 Bytes
/
Rakefile
File metadata and controls
38 lines (30 loc) · 800 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
31
32
33
34
35
36
37
38
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'yard'
RSpec::Core::RakeTask.new(:spec)
RuboCop::RakeTask.new
YARD::Rake::YardocTask.new(:yard) do |t|
t.files = ['lib/**/*.rb']
t.options = ['--readme', 'README.md', '--output-dir', 'docs/api']
end
namespace :docs do
desc 'Generate YARD API documentation'
task api: :yard
desc 'Serve Jekyll documentation locally'
task :serve do
Dir.chdir('docs') do
sh 'bundle install --quiet'
sh 'bundle exec jekyll serve'
end
end
desc 'Build all documentation (Jekyll + YARD)'
task build: :yard do
Dir.chdir('docs') do
sh 'bundle install --quiet'
sh 'bundle exec jekyll build'
end
end
end
task default: %i[spec rubocop]