Sha256: db3bc7829be77847b649d729d5853e2c83f8d41d8e291d3e5adf537d34905ebe

Contents?: true

Size: 939 Bytes

Versions: 1

Compression:

Stored size: 939 Bytes

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'

    js :app, '/js/app.js', [
      '/js/vendor/**/*.js',
      '/js/assets/**/*.js',
      '/js/hi.js',
      '/js/hell*.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'
    ]
  }

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sinatra-assetpack-0.0.5 test/app/app.rb