Sha256: 38be0f2f125afa0f4a1fa1a824fbab1a78290ddbf4c240de2e8d2d03cd571ae5
Contents?: true
Size: 636 Bytes
Versions: 5
Compression:
Stored size: 636 Bytes
Contents
# frozen_string_literal: true require 'json' module Leftovers module Precompilers class Precompiler def initialize(precompiler, matcher) @precompiler = precompiler @matcher = matcher end def precompile(content, file) return unless @matcher === file.relative_path begin @precompiler.precompile(content) rescue Leftovers::PrecompileError => e e.warn(path: file.relative_path) '' rescue StandardError => e Leftovers.warn "#{e.class}: #{file.relative_path} #{e.message}" '' end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems