Sha256: 23464d64a1b2a287c852472d26dd007a91cb4c0c389c8a262a8c58eaf0f29437

Contents?: true

Size: 1.34 KB

Versions: 5

Compression:

Stored size: 1.34 KB

Contents

# frozen_string_literal: true

require 'avm/eac_writings_base1/build'
require 'avm/eac_writings_base1/project'
require 'eac_cli/core_ext'
require 'eac_ruby_utils/console/docopt_runner'

module Avm
  module Tools
    class Runner < ::EacRubyUtils::Console::DocoptRunner
      class LocalProject < ::EacRubyUtils::Console::DocoptRunner
        class EacWritingsBase1
          class Build
            runner_with :help do
              desc 'Build the project'
              arg_opt '-d', '--target-dir', 'Directory to build'
            end

            def run
              start_banner
              build.run
            end

            private

            def build_uncached
              ::Avm::EacWritingsBase1::Build.new(runner_context.call(:project),
                                                 target_directory: parsed.target_dir)
            end

            def default_target_directory
              runner_context.call(:project).root.join('build')
            end

            def start_banner
              runner_context.call(:project_banner)
              infov 'Target directory', build.target_directory
            end
            #
            #            def target_directory_uncached
            #              .if_present(default_target_directory).to_pathname
            #            end
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
avm-tools-0.86.0 lib/avm/tools/runner/local_project/eac_writings_base1/build.rb
avm-tools-0.85.1 lib/avm/tools/runner/local_project/eac_writings_base1/build.rb
avm-tools-0.85.0 lib/avm/tools/runner/local_project/eac_writings_base1/build.rb
avm-tools-0.84.0 lib/avm/tools/runner/local_project/eac_writings_base1/build.rb
avm-tools-0.83.0 lib/avm/tools/runner/local_project/eac_writings_base1/build.rb