-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
31 lines (23 loc) · 964 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
require "standard/rake"
require "rake/extensiontask"
Rake::ExtensionTask.new("io_buffer_hacks")
Rake::ExtensionTask.new("io_buffer_reader")
task default: [:compile, "slides.html", "notes.txt"]
file "slides.html" => ["slides.md", "fig2.svg", "asciinema-player.js", "asciinema-player.css"] do |t|
sh "node_modules/.bin/marp --html #{t.prerequisites.first} -o #{t.name}"
end
file "notes.txt" => ["slides.md"] do |t|
sh "node_modules/.bin/marp --notes #{t.prerequisites.first} -o #{t.name}"
end
file "asciinema-player.js" => "node_modules/asciinema-player/dist/bundle/asciinema-player.js" do |t|
cp t.prerequisites.first, t.name
end
file "asciinema-player.css" => "node_modules/asciinema-player/dist/bundle/asciinema-player.css" do |t|
cp t.prerequisites.first, t.name
end
task :server => ["fig2.svg"] do
sh "node_modules/.bin/marp --server --html ."
end
file "fig2.svg" => ["charts.py", *Dir.glob("*.csv")] do |t|
sh "./charts.py"
end