Sha256: 5caab482b0af21ecee85a7f289c63f6d7ed3ecb61617524c86a10d1a5730818f

Contents?: true

Size: 499 Bytes

Versions: 5

Compression:

Stored size: 499 Bytes

Contents

# frozen_string_literal: true

require 'coffee-script'

module Epuber
  class Compiler
    module FileTypes
      require_relative 'source_file'

      class CoffeeScriptFile < SourceFile
        # @param [Compiler::CompilationContext] compilation_context
        #
        def process(compilation_context)
          return if destination_file_up_to_date?

          write_compiled(CoffeeScript.compile(File.new(abs_source_path)))

          update_metadata!
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
epuber-0.7.4 lib/epuber/compiler/file_types/coffee_script_file.rb
epuber-0.7.3 lib/epuber/compiler/file_types/coffee_script_file.rb
epuber-0.7.2 lib/epuber/compiler/file_types/coffee_script_file.rb
epuber-0.7.1 lib/epuber/compiler/file_types/coffee_script_file.rb
epuber-0.7.0 lib/epuber/compiler/file_types/coffee_script_file.rb