-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
28 lines (23 loc) · 534 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
#!/usr/bin/env ruby
require 'rake/testtask'
require 'rubygems'
require 'rake'
require 'haml'
task default: :compile
task :compile do
FileList.new('./src/*.html.haml').each do |filename|
if filename =~ /([^\/]+)\.haml$/
File.open($1, 'w') do |f|
f.write Haml::Engine.new(File.read(filename)).render
end
end
end
end
task :clean do
FileUtils.rm_r(Dir.glob("./*.html"), force: true)
end
task :test do
Rake::TestTask.new do |t|
t.test_files = FileList['test/jenkins_sample_test.rb']
end
end