diff --git a/src/write/cli.cr b/src/write/cli.cr index c7b378f..a14fa5c 100644 --- a/src/write/cli.cr +++ b/src/write/cli.cr @@ -11,12 +11,16 @@ module DocMachine::Write config = Config.new(parent_config) opts.on("write", "Write content target for plan (beta)") do - opts.banner = "Usage: #{PROGRAM_NAME} scaffold [options] TARGET" + opts.banner = "Usage: #{PROGRAM_NAME} write [options] TARGET" opts.on("-f", "--force", "Don't ask for confirmation") do config.force = true end + opts.on("-t", "--template TEMPLATE", "Use given template") do |template_name| + config.template_name = template_name + end + commands << ->() : Nil do Log.debug { "before any" } if args.size < 1 diff --git a/src/write/config.cr b/src/write/config.cr index 9adc918..cb38f72 100644 --- a/src/write/config.cr +++ b/src/write/config.cr @@ -6,6 +6,7 @@ module DocMachine::Write property target_directory : String = "." property force : Bool = false + property template_name : String = "" def initialize(@parent : DocMachine::Config) end