Sha256: 7ac8ba90bcdc6810eaf8b5bfd8f30b15f73ea2ccfaef5d03ecb8daaab1c58d10

Contents?: true

Size: 1.37 KB

Versions: 14

Compression:

Stored size: 1.37 KB

Contents

$:.unshift File.expand_path('../../../lib', __FILE__)

require 'sinatra/base'
require 'sinatra/assetpack'
require 'coffee-script'

class Main < Sinatra::Base
  set :root, File.dirname(__FILE__)
  set :views, "#{root}/app/views"

  register Sinatra::AssetPack

  enable  :raise_errors
  disable :show_exceptions

  assets {
    serve '/js',     :from => 'app/js'
    serve '/css',    :from => 'app/css'
    serve '/images', :from => 'app/images'
    serve '/fonts',    :from => 'app/fonts'
    serve '/packages',    :from => 'app/packages'

    js :a_package, '/packages/a_package.js', [
      '/packages/a_package/package.js',
    ]

    js :skitch, '/skitch.js', [
      '/js/hi.js',
    ]

    js :app, '/js/app.js', [
      '/js/vendor/**/*.js',
      '/js/assets/**/*.js',
      '/js/hi.js',
      '/js/hell*.js'
    ]

    js :encoding, '/js/encoding.js', [
      '/js/yoe.js',
      '/js/helloe.js'
    ]

    css :application, '/css/application.css', [
      '/css/screen.css'
    ]

    css :js2, '/css/js2.css', [
      '/css/js2c.css'
    ]

    css :sq, '/css/sq.css', [
      '/css/sqwishable.css'
    ]

    css :redundant, [
      '/css/scre*.css',
      '/css/scre*.css',
      '/css/scre*.css',
      '/css/screen.css'
    ]

  }

  get '/index.html' do
    haml :index
  end

  get '/helpers/css' do
    haml %{
      != css :application, :media => 'screen'
    }.strip
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
sinatra-assetpack-0.2.7 test/app/app.rb
sinatra-assetpack-0.2.6 test/app/app.rb
sinatra-assetpack-0.2.5 test/app/app.rb
sinatra-assetpack-0.2.4 test/app/app.rb
sinatra-assetpack-0.2.3 test/app/app.rb
sinatra-assetpack-0.2.2 test/app/app.rb
sinatra-assetpack-0.2.1 test/app/app.rb
sinatra-assetpack-0.2.0 test/app/app.rb
sinatra-assetpack-0.1.7 test/app/app.rb
sundawg-sinatra-assetpack-fork-0.1.6 test/app/app.rb
sinatra-assetpack-0.1.6 test/app/app.rb
sinatra-assetpack-0.1.5 test/app/app.rb
sinatra-assetpack-0.1.4 test/app/app.rb
sinatra-assetpack-0.1.3 test/app/app.rb