Sha256: af6ace1d9a7e7e3c0952c002485514fbc851f41fe502f8f312809da31f303fcb

Contents?: true

Size: 508 Bytes

Versions: 11

Compression:

Stored size: 508 Bytes

Contents

module Octopress
  module Ink
    module Assets
      class Coffeescript < Javascript
        def read
          @compiled ||= compile
        end

        def add
          Plugins.add_js_tag tag
          Plugins.static_files << StaticFileContent.new(read, destination)
        end

        private

        def compile
          ::CoffeeScript.compile(render)
        end

        def destination
          File.join(base, plugin.slug, file.sub(/\.coffee/,'.js'))
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
octopress-ink-1.0.0.rc.13 lib/octopress-ink/assets/coffeescript.rb
octopress-ink-1.0.0.rc.11 lib/octopress-ink/assets/coffeescript.rb
octopress-ink-1.0.0.rc.10 lib/octopress-ink/assets/coffeescript.rb
octopress-ink-1.0.0.rc.9 lib/octopress-ink/assets/coffeescript.rb
octopress-ink-1.0.0.rc.8 lib/octopress-ink/assets/coffeescript.rb
octopress-ink-1.0.0.rc.7 lib/octopress-ink/assets/coffeescript.rb
octopress-ink-1.0.0.rc.6 lib/octopress-ink/assets/coffeescript.rb
octopress-ink-1.0.0.rc.5 lib/octopress-ink/assets/coffeescript.rb
octopress-ink-1.0.0.rc.3 lib/octopress-ink/assets/coffeescript.rb
octopress-ink-1.0.0.rc.2 lib/octopress-ink/assets/coffeescript.rb
octopress-ink-1.0.0.rc.1 lib/octopress-ink/assets/coffeescript.rb