Sha256: 434b9cbec6c65c6dd6b4cb9f26d55d627780eae1ea9d2a07c4975536541137a1

Contents?: true

Size: 1.21 KB

Versions: 6

Compression:

Stored size: 1.21 KB

Contents

require 'rack'
require 'yaml'
autoload :Uglifier, 'uglifier'
autoload :Tilt, 'tilt'

# Asset packer, middleware and helpers
# @homepage: https://github.com/fugroup/asset
# @author:   Vidar <vidar@fugroup.net>, Fugroup Ltd.
# @license:  MIT, contributions are welcome.
module Asset
  class << self; attr_accessor :mode, :path, :cache, :favicon, :robots, :manifest, :bundle, :images, :debug; end

  # Default is development
  @mode = ENV['RACK_ENV'] || 'development'

  # Where your assets live
  @path = File.join(Dir.pwd, 'app', 'assets')

  # Where to write the cache, default to APP_ROOT/tmp
  @cache = File.join(Dir.pwd, 'tmp')

  # Automatically bounce (404) for browser /favicon.ico requests
  @favicon = true

  # Send /robots.txt to a standard robots txt with reference to /sitemap.xml
  @robots = true

  # Debug option
  @debug = false
end

require_relative 'assets/util'
require_relative 'assets/item'

# Load the manifest
::Asset.manifest = ::Asset::Util.load_manifest

# Load the bundle
::Asset.bundle = YAML.load_file(File.join(::Asset.path, 'manifest.yml'))

# Load the images
::Asset.images = ::Asset::Util.load_images

require_relative 'assets/helpers'
require_relative 'assets/filters'
require_relative 'assets/router'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
asset-0.1.7 lib/asset.rb
asset-0.1.6 lib/asset.rb
asset-0.1.5 lib/asset.rb
asset-0.1.4 lib/asset.rb
asset-0.1.3 lib/asset.rb
asset-0.1.2 lib/asset.rb