Sha256: ab804aafd61f644a8941ab8156bd523934ba47f3672de33e987764f0f189242c

Contents?: true

Size: 448 Bytes

Versions: 4

Compression:

Stored size: 448 Bytes

Contents

module Nanoc::Filters

  # @since 3.3.0
  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

4 entries across 4 versions & 1 rubygems

Version Path
nanoc-3.6.7 lib/nanoc/filters/coffeescript.rb
nanoc-3.6.6 lib/nanoc/filters/coffeescript.rb
nanoc-3.6.5 lib/nanoc/filters/coffeescript.rb
nanoc-3.6.4 lib/nanoc/filters/coffeescript.rb