Sha256: d45f4fe7d9353b522fe4892162928ca59a24e24a5fe529668660f111b731874e

Contents?: true

Size: 445 Bytes

Versions: 3

Compression:

Stored size: 445 Bytes

Contents

module Nanoc::Filters
  # @api private
  class CoffeeScript < Nanoc::Filter
    requires 'coffee-script'

    # Runs the content through [CoffeeScript](http://coffeescript.org/).
    # This method takes no options.
    #
    # @param [String] content The CoffeeScript content to turn into JavaScript
    #
    # @return [String] The resulting JavaScript
    def run(content, _params = {})
      ::CoffeeScript.compile(content)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nanoc-4.4.7 lib/nanoc/filters/coffeescript.rb
nanoc-4.4.6 lib/nanoc/filters/coffeescript.rb
nanoc-4.4.5 lib/nanoc/filters/coffeescript.rb