Sha256: 1ff57d185990c460bfd4ab066416c37a3ac3eaa6892d0845ea2673d3cca8e940
Contents?: true
Size: 558 Bytes
Versions: 22
Compression:
Stored size: 558 Bytes
Contents
module MagLove module Tilt class LessTemplate < ::Tilt::Template self.default_mime_type = 'theme/html' def prepare @parser = ::Less::Parser.new(options.merge(filename: eval_file, line: line, relativeUrls: false)) end def evaluate(scope, locals, &block) prepared_data = "@base: \"#{locals[:base_path].sub('src/', '../../')}\";\n#{data}" @engine = @parser.parse(prepared_data) @output ||= @engine.to_css(options) end end end end Tilt.mappings["less"] = [MagLove::Tilt::LessTemplate]
Version data entries
22 entries across 22 versions & 1 rubygems