-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
32 lines (25 loc) · 682 Bytes
/
Rakefile
File metadata and controls
32 lines (25 loc) · 682 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
$: << 'lib'
require 'fileutils'
require 'haml'
require 'uv'
require 'maruku'
require 'maruku/ext/div'
require 'maruku/ext/uv_code'
UV_THEME = ENV['UV_THEME'] || "blackboard"
task :default => 'index.html'
desc "Default: Generate presentation and write to index.html"
file 'index.html' => ['skeleton.haml', 'slides.markdown'] do |t|
skel = Haml::Engine.new(File.read(t.prerequisites[0]))
slides = Maruku.new(File.read(t.prerequisites[1]))
File.open(t.name, 'w') do |f|
presentation = skel.render() do
slides.to_html
end
f.write(presentation)
end
end
desc "Initialize Ultraviolet"
task :uv_init do
mkdir "uv"
Uv.copy_files "xhtml", "uv"
end