Sha256: 526554eb3d9fab8a4c0c1847006d374282ff8f37242b31ec12c652d6410c2d8a
Contents?: true
Size: 1013 Bytes
Versions: 2
Compression:
Stored size: 1013 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 :maxcdn, nil, 'MaxCDN options' option :rackspace, nil, 'Rackspace 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
middleman-cdn-0.1.11 | lib/middleman-cdn/extension.rb |
middleman-cdn-0.1.10 | lib/middleman-cdn/extension.rb |