Sha256: b49356f645df96559826ae218fe47349cc2d91abd4ad1bf02c95567000dfcfa6

Contents?: true

Size: 464 Bytes

Versions: 5

Compression:

Stored size: 464 Bytes

Contents

# frozen_string_literal: true

module Jekyll
  module Converters
    class CoffeeScript < Converter
      safe true
      priority :low

      def setup
        require "coffee-script"
        @setup = true
      end

      def matches(ext)
        ext.casecmp(".coffee").zero?
      end

      def output_ext(_ext)
        ".js"
      end

      def convert(content)
        setup unless @setup
        ::CoffeeScript.compile(content)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jekyll-coffeescript-2.0.0 lib/jekyll/converters/coffeescript.rb
jekyll-coffeescript-1.2.1 lib/jekyll/converters/coffeescript.rb
jekyll-coffeescript-1.2.0 lib/jekyll/converters/coffeescript.rb
jekyll-coffeescript-1.1.1 lib/jekyll/converters/coffeescript.rb
jekyll-coffeescript-1.1.0 lib/jekyll/converters/coffeescript.rb