Skip to content

Commit 4586f0e

Browse files
committed
Rakefile: add more targets for development
1 parent 1d9b601 commit 4586f0e

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

Rakefile

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
require 'html/proofer'
22

3-
task :test do
4-
sh "bundle exec jekyll build"
3+
task :default => :build
4+
5+
desc 'Clean up site output'
6+
task :clean do
7+
cleanup
8+
end
9+
10+
desc 'Build site with Jekyll'
11+
task :build => :clean do
12+
jekyll('build')
13+
end
14+
15+
desc 'Check site with html-proofer'
16+
task :test => :build do
517
HTML::Proofer.new("./_site").run
618
end
19+
20+
desc 'Start Jekyll server with --watch'
21+
task :server => :clean do
22+
jekyll('serve --watch')
23+
end
24+
25+
def cleanup
26+
sh 'rm -rf _site'
27+
end
28+
29+
def jekyll(opts = '')
30+
sh 'bundle exec jekyll ' + opts
31+
end

0 commit comments

Comments
 (0)