lib/simba/base_app/config/boot.rb in simba-0.0.2 vs lib/simba/base_app/config/boot.rb in simba-0.0.3
- old
+ new
@@ -7,25 +7,25 @@
DB = Sequel.sqlite("./db/#{ENV["RACK_ENV"]}.db")
# init sinatra
set :sessions, true
set :root, File.expand_path(".")
set :views, settings.root + "/app/views"
+# sinatra reloader
+if development?
+ require "sinatra/reloader"
+ also_reload "lib/**/*.rb", "app/{models,helpers}/**/*.rb"
+end
# assetpack support
assets do
- css_compression :sass
- js_compression :uglify
-
serve "/js", :from => "app/assets/js"
serve "/css", :from => "app/assets/css"
serve "/img", :from => "app/assets/img"
- js :application, [
- "/js/*.js"
- ]
+ css_compression :sass
+ js_compression :uglify
- css :application, [
- "/css/*.css"
- ]
+ js :application, ["/js/*.js"]
+ css :application, ["/css/*.css"]
end
# require sinatra files
Dir.glob "./{lib,app/models,app/helpers,app/controllers}/**/*.rb" do |f|
require f
end