Sha256: 2389832ed736a026ffa93e757b98d08bcab6e9b9eff3f4a803784d13db4a1ccc

Contents?: true

Size: 820 Bytes

Versions: 1

Compression:

Stored size: 820 Bytes

Contents

require_relative 'assets'
require_relative 'config'
require_relative 'middleware'
require_relative 'version'

require_relative 'preprocessors/css-preprocessor'
require_relative 'preprocessors/image-preprocessor'
require_relative 'preprocessors/javascript-preprocessor'
require_relative 'preprocessors/sass-preprocessor'

Pakyow::App.after :init do
  config.assets.stores.each_pair do |name, path|
    Pakyow::Assets.register_path_with_name(path, name)
  end

  if config.assets.compile_on_startup
    Pakyow::App.processor :html do |content|
      Pakyow::Assets.mixin_fingerprints(content)
    end

    Pakyow.logger.debug 'Precompiling assets...'
    Pakyow::Assets.precompile
    Pakyow.logger.debug 'Finished precompiling!'
  end
end

Pakyow::App.middleware do |builder|
  builder.use Pakyow::Assets::Middleware
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pakyow-assets-0.1.0 lib/pakyow-assets.rb