Sha256: 584d3cbd93f565e9108b523bd5cb1c76e2bb664c8fef92eab5ca369e8f86dc0d
Contents?: true
Size: 1.13 KB
Versions: 3
Compression:
Stored size: 1.13 KB
Contents
# frozen_string_literal: true require 'eac_cli/core_ext' require 'ehbrs/cooking_book/build' require 'os' module Ehbrs class Runner class CookingBook class Build runner_with :help, :subcommands do desc 'Operações para livros de receitas.' arg_opt '-d', '--target-dir', 'Caminho para o diretório destino da construção.' bool_opt '--open', 'Show the result.' end def run start_banner build.run open success 'Done' end private def build_uncached ::Ehbrs::CookingBook::Build.new( runner_context.call(:project), target_dir: parsed.target_dir ) end def open return unless parsed.open? infom "Opening \"#{open_path}\"..." ::EacRubyUtils::Envs.local.command(OS.open_file_command, open_path).system! end def open_path build.index_page.target_path end def start_banner infov 'Project', build.project infov 'Target directory', build.target_dir end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ehbrs-tools-0.23.0 | lib/ehbrs/runner/cooking_book/build.rb |
ehbrs-tools-0.22.0 | lib/ehbrs/runner/cooking_book/build.rb |
ehbrs-tools-0.21.0 | lib/ehbrs/runner/cooking_book/build.rb |