Sha256: ba714c1b3bec4f39e07043b392ac68137ee830249d2b6944b4a01f2af84b1f58

Contents?: true

Size: 629 Bytes

Versions: 9

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true

require 'avm/executables'

module Avm
  module EacWritingsBase1
    class Build
      class File
        enable_console_speaker
        common_constructor :build, :subpath

        def run
          infov 'Building', subpath
          target_path.parent.mkpath
          ::Avm::Executables.asciidoc.command('--out-file', target_path, source_path).system!
        end

        def source_path
          build.project.root.join(subpath)
        end

        def target_path
          build.target_directory.join(subpath).basename_sub('.*') { |b| "#{b}.html" }
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
avm-tools-0.89.0 lib/avm/eac_writings_base1/build/file.rb
avm-tools-0.88.0 lib/avm/eac_writings_base1/build/file.rb
avm-tools-0.87.1 lib/avm/eac_writings_base1/build/file.rb
avm-tools-0.87.0 lib/avm/eac_writings_base1/build/file.rb
avm-tools-0.86.0 lib/avm/eac_writings_base1/build/file.rb
avm-tools-0.85.1 lib/avm/eac_writings_base1/build/file.rb
avm-tools-0.85.0 lib/avm/eac_writings_base1/build/file.rb
avm-tools-0.84.0 lib/avm/eac_writings_base1/build/file.rb
avm-tools-0.83.0 lib/avm/eac_writings_base1/build/file.rb