Adds a living style guide to your Rails application with one command.
If you don't use a CSS style guide yet, here's why you should start:
Add this gem to your Rails Gemfile:
gem 'styleguide_rails'
Run bundle
, and execute the styleguide generator:
rails generate styleguide:install
That's it, you're done, you have a styleguide available at
http://yourapp.com/styleguide
. If you visit that path you'll see there
is an example widget already created:
To add a new widget, run
rails generate styleguide:widget NAME
which will create a partial in app/views/styleguide/widgets
and it
will appear in the style guide. These partials support templating
languages like Haml if you have the gems installed.
Styleguide Rails can reload your browser whenever you change a CSS file or a widget. This instant feedback is helpful for adjusting the styles. To enable live reloading,
gem 'guard'
and gem 'guard-livereload', '~> 2.4', require: false
to your Gemfile
bundle
guard
in a new terminal windowThanks to project contributors, and to Adam Braus for suggesting the idea for this gem.
To overwrite an installation of an earlier version, run
bundle update --source styleguide_rails
rails generate styleguide:install -f
Don't worry, this will preserve any existing widgets.
Styleguide_rails is Copyright © 2012 - 2013 Joe Nelson. It is free software, and may be redistributed under the terms specified in the LICENSE file.