Sha256: 0aec3f0b08b0cdb3cbb7135ae829de5fd98aada7fc2c4e04915467811429b2ce

Contents?: true

Size: 466 Bytes

Versions: 39

Compression:

Stored size: 466 Bytes

Contents

module Nanoc::Filters
  # @since 3.3.0
  #
  # @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

39 entries across 39 versions & 1 rubygems

Version Path
nanoc-4.4.4 lib/nanoc/filters/coffeescript.rb
nanoc-4.4.3 lib/nanoc/filters/coffeescript.rb
nanoc-4.4.2 lib/nanoc/filters/coffeescript.rb
nanoc-4.4.1 lib/nanoc/filters/coffeescript.rb
nanoc-4.4.0 lib/nanoc/filters/coffeescript.rb
nanoc-4.3.8 lib/nanoc/filters/coffeescript.rb
nanoc-4.3.7 lib/nanoc/filters/coffeescript.rb
nanoc-4.3.6 lib/nanoc/filters/coffeescript.rb
nanoc-4.3.5 lib/nanoc/filters/coffeescript.rb
nanoc-4.3.4 lib/nanoc/filters/coffeescript.rb
nanoc-4.3.3 lib/nanoc/filters/coffeescript.rb
nanoc-4.3.2 lib/nanoc/filters/coffeescript.rb
nanoc-4.3.1 lib/nanoc/filters/coffeescript.rb
nanoc-4.3.0 lib/nanoc/filters/coffeescript.rb
nanoc-4.2.4 lib/nanoc/filters/coffeescript.rb
nanoc-4.2.3 lib/nanoc/filters/coffeescript.rb
nanoc-4.2.2 lib/nanoc/filters/coffeescript.rb
nanoc-4.2.1 lib/nanoc/filters/coffeescript.rb
nanoc-4.2.0 lib/nanoc/filters/coffeescript.rb
nanoc-4.1.6 lib/nanoc/filters/coffeescript.rb