Skip to content

Latest commit

 

History

History
55 lines (43 loc) · 1.53 KB

File metadata and controls

55 lines (43 loc) · 1.53 KB

Description

Yet another opinionated sinatra app bootstrapped with bootstrap. This one comes with haml, rspec and rack-test setup, a syncable bootstrap, a default layout and ready for heroku.

Setup

$ git clone git://github.com/cldwalker/sinatra-bootstrap.git my_app
$ cd my_app
$ bundle install

App is named My::Application by default. Rename as desired (Yes, Sinatra::Application exists but screw top-level extensions).

Usage

# In dev
$ bundle exec shotgun
# In production
$ bundle exec thin start
# To herokuify
$ heroku create -s cedar && heroku open

Using bootstrap

Bootstrap files are available under public/bootstrap/{css,img,js}. The layout, views/layout.haml, points to those files. If you'd like to update public/bootstrap to the latest bootstrap version:

# Only do this once
$ rake bootstrap:init

# Run this every time
$ rake bootstrap:update

If lessc and uglifyjs are installed, the update task will compile the assets into a zip file. Otherwise, it'll use the prebuilt assets.

TODO

  • Replace git submodule with a temp clone
  • Setup airbrake with errbit
  • Setup coffeescript with testing
  • Gemify useful components as needed
  • Consider scss/less

Credits