Sha256: 956a3fee207e0b9174315611475091cf3d853ee1633dd3d96b106a8cf255d782

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

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

require 'sinatra/base'
require 'sinatra/assetpack'

class App < Sinatra::Base
  set :root, File.dirname(__FILE__)
  register Sinatra::AssetPack

  assets do
    js :main, '/js/main.js', [
      '/js/vendor/*.js',
      '/js/app.js'
    ]

    css :main, [
      '/css/*.css'
    ]

    # The second parameter here is optional (see above).
    # It will default to '/css/#{name}.css'.
    css :more, '/css/more.css', [
      '/css/more/*.css'
    ]
  end

  get '/' do
    erb :index
  end
end

if __FILE__ == $0
  App.run!
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sinatra-assetpack-0.0.9 examples/basic/app.rb
sinatra-assetpack-0.0.8 example/app.rb
sinatra-assetpack-0.0.6 example/app.rb