Sha256: 08a6ede683e577dd5f5af8de0c1e7d606a05e870d807b26cec27df37ea6b26e6
Contents?: true
Size: 1.11 KB
Versions: 2
Compression:
Stored size: 1.11 KB
Contents
require 'rake/clean' # FileLists DIR_IMAGES_FILES = FileList["images/**/*"] revealjs = File.expand_path(File.join(File.dirname(__FILE__), '..', 'reveal.js')) REVEAL_FILES = FileList["#{revealjs}/**/*"] # # task: slides task 'slides' do mkdir_p 'slides', verbose: false end CLEAN.include 'slides' # # task: slides.html desc 'Build slides.html' file 'slides/slides.html' => [ 'slides.haml', 'slides' ] do processor = HamlProcessor.open 'slides.haml' File.open('slides/slides.html', 'w') { |f| f << processor.html } end CLEAN.include 'slides/slides.html' # # task: presentation desc 'Build presentation' task :presentation => [ 'slides/slides.html'] do cp_r REVEAL_FILES, 'slides', verbose: false mkdir_p 'slides/images', verbose: false cp_r DIR_IMAGES_FILES, 'slides/images', verbose: false line_nums = { default_slides: { first: 37, last: 338 } } default_slides = line_nums[:default_slides][:first]..line_nums[:default_slides][:last] FileSlicer.remove! 'slides/index.html', default_slides FileSplicer.insert! 'slides/slides.html', into: 'slides/index.html', after: '<div class="slides">' end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
reveal-ck-0.1.2 | rakelib/presentation.rake |
reveal-ck-0.1.1 | rakelib/presentation.rake |