Sha256: 403de3ea3cb8fd19261d245682a8862685c8efc8addd8380c67114c88e5e7c08
Contents?: true
Size: 1.03 KB
Versions: 20
Compression:
Stored size: 1.03 KB
Contents
require 'awestruct/handler_chain' require 'awestruct/handlers/base_handler' require 'awestruct/handlers/file_handler' require 'awestruct/handlers/front_matter_handler' require 'awestruct/handlers/interpolation_handler' module Awestruct module Handlers class JavascriptHandler < BaseHandler CHAIN = Awestruct::HandlerChain.new( /\.js$/, Awestruct::Handlers::FileHandler, Awestruct::Handlers::FrontMatterHandler, Awestruct::Handlers::InterpolationHandler, Awestruct::Handlers::JavascriptHandler ) def initialize(site, delegate) super( site, delegate ) end def simple_name File.basename( relative_source_path, '.js' ) end def output_filename File.basename( relative_source_path ) end def output_extension '.js' end def content_syntax :javascript end def rendered_content(context, with_layouts=false) delegate.rendered_content( context, with_layouts ) end end end end
Version data entries
20 entries across 20 versions & 1 rubygems