Class: Zlide::CLI::Base

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/zlide/cli/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



8
9
10
# File 'lib/zlide/cli/base.rb', line 8

def self.source_root
  File.expand_path("../../templates", __FILE__)
end

Instance Method Details

#new(name) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/zlide/cli/base.rb', line 13

def new(name)
  empty_directory(name)
  self.destination_root = name
  ["slides", "public", "stylesheets", "config"].each do |subdirectory|
    empty_directory(subdirectory)
  end
  @name = name
  template "config/deck.yml.tt"
  template "README.md.tt"
  copy_file "stylesheets/deck-theme.css"
  copy_file "stylesheets/highlight-theme.css"
  copy_file "stylesheets/slides.css"
end

#pdfObject



33
34
35
36
# File 'lib/zlide/cli/base.rb', line 33

def pdf
  deck = Zlide::Deck.new
  deck.to_pdf
end

#serveObject



28
29
30
# File 'lib/zlide/cli/base.rb', line 28

def serve
  Zlide::Server::Base.run! 
end