-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.rb
30 lines (25 loc) · 783 Bytes
/
app.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require 'bundler'
Bundler.require
class App < Sinatra::Base
set :sprockets, Sprockets::Environment.new(root)
set :precompile, [ /\w+\.(?!js\.coffee).+/, /application\.js\.coffee$/ ]
set :assets_prefix, '/assets'
set :digest_assets, false
set(:assets_path) { File.join public_folder, assets_prefix }
configure do
sprockets.append_path File.join(root, 'assets', 'javascripts')
sprockets.append_path File.dirname(HamlCoffeeAssets.helpers_path)
Sprockets::Helpers.configure do |config|
config.environment = sprockets
config.prefix = assets_prefix
config.digest = digest_assets
config.public_path = public_folder
end
end
helpers do
include Sprockets::Helpers
end
get '/' do
haml :index
end
end