-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathRakefile
44 lines (36 loc) · 922 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
# frozen_string_literal: true
require 'colorize'
require 'jekyll'
require 'rubocop/rake_task'
task default: :test
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ['-D', '-S', '-E']
end
desc 'Build the site with Jekyll'
task :build do
Jekyll::Commands::Build.process(profile: true)
end
desc 'Remove generated site'
task :clean do
Jekyll::Commands::Clean.process({})
end
desc 'Check for Jekyll deprecation issues'
task :doctor do
Jekyll::Commands::Doctor.process({})
end
desc 'Build and validate the site'
task :test do
notify 'Checking code'
Rake::Task['rubocop'].invoke
notify 'Building site'
Rake::Task['build'].invoke
notify 'Checking for deprecation issues'
Rake::Task['doctor'].invoke
end
def notify(message)
puts
puts '###################################################'.blue
puts "#{message}...".blue
puts '###################################################'.blue
puts
end