Sha256: 08de518d62782b2d409fabfcc21de699944be39a8e2c89eba1600c2369c3733f
Contents?: true
Size: 1.05 KB
Versions: 78
Compression:
Stored size: 1.05 KB
Contents
module Brief::Adapters class MiddlemanExtension < ::Middleman::Extension def self.activate_brief_extension ::Middleman::Extensions.register(:brief, Brief::Adapters::MiddlemanExtension) end def initialize(app, options_hash = {}, &block) super end helpers do def brief_config_path Pathname(root).join("brief.rb") end def briefs briefcase end def briefcase if !brief_config_path.exist? brief_config_path.open("w+") {|fh| fh.write("# See github.com/datapimp/brief for documentation")} end if development? Brief::Briefcase.new(root: root, config_path: brief_config_path, caching: false) else @briefs ||= begin Brief::Briefcase.new(root: root, config_path: brief_config_path, caching: true) end end end end end end
Version data entries
78 entries across 78 versions & 1 rubygems