lib/prez/cli.rb in prez-0.0.1 vs lib/prez/cli.rb in prez-0.0.2

- old
+ new

@@ -1,35 +1,28 @@ require "prez/build" +require "prez/new" +require "prez/start" require "prez/version" require "thor" -require "thor/actions" module Prez class CLI < Thor - include Thor::Actions register Prez::Build, "build", "build NAME", "Builds the single html presentation from the prez file" + register Prez::New, "new", "new NAME", "Generates a new presentation" + register Prez::Start, "start", "start NAME", "Launches your browser with the given presentation" map "-v" => "version" - desc "new NAME", "Generates a new presentation" - def new(name) - template "new.prez.tt", "#{name}.prez" - end - desc "version", "Show the prez version" long_desc " This can be optionally used as 'prez -v'" def version say Prez::Version end class << self def exit_on_failure? true - end - - def source_root - File.absolute_path File.expand_path("../../../templates", __FILE__) end end end end