Sha256: c8fa1c3364e3600af7b793754b65e0892cf139336e3558ef0869962f47f4b55a
Contents?: true
Size: 919 Bytes
Versions: 1
Compression:
Stored size: 919 Bytes
Contents
require 'middleman-core' module Middleman module CDN module Helpers def cdn_options ::Middleman::CDN::CDNExtension.options end end class CDNExtension < Middleman::Extension option :cloudflare, nil, 'CloudFlare options' option :cloudfront, nil, 'CloudFront options' option :fastly, nil, 'Fastly options' option :filter, nil, 'Cloudflare options' option :after_build, false, 'Cloudflare options' def initialize(app, options_hash = {}, &block) super @@cdn_options = options app.after_configuration do app.after_build do ::Middleman::Cli::CDN.new.cdn_invalidate(@@cdn_options) if @@cdn_options.after_build end end app.send :include, Helpers end def registered included end def self.options @@cdn_options end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
middleman-cdn-0.1.8 | lib/middleman-cdn/extension.rb |