• Stars
    star
    152
  • Rank 244,685 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 13 years ago
  • Updated about 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A rails engine for @kneath's KSS documentation

KSS Rails

KSS Rails provides a Rails 3 engine for you to mount onto your existing Rails 3 application that will automatically parse your stylesheets that live within app/assets/stylesheets and give you a styleguide visible at whichever URL you choose.

Install the gem:

gem install kss-rails

Add it to the development group within the Gemfile and re-bundle:

group :development do
  gem 'kss-rails'
end

Run the install generator which will copy over some initial templates for you to base your styleguide definitions off of. There may be some extra changes to the layouts that you need to do, but that is dependent on how crazy your application is.

rails generate kss:install

The install generator will have already appended the route for KSS Rails for you at the '/kss' URL, but if you'd like to change that you can within your routes file.

Example::Application.routes.draw do
  root :to => 'home#index'

  mount Kss::Engine => '/kss' if Rails.env.development?
end

That's it, restart your app and visit http://yoururl/kss (or whichever URL you choose).

Please visit the KSS repo for further documentation and helpful tips.

Customizing

Out of the box KSS Rails has built in templates, stylesheets and javascripts that you can use without any customization just fine.

But if you're looking to add more layout styles or updating the templates, you can create your own copy within your application at any of the paths within the app folder.

Credits

All credit goes to Kyle Neath for creating the KSS gem and hopefully this will allow people to create styleguides for every site they work on with little to no additional effort.

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself in another branch so I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright © 2011 Garrett Bjerkhoel. See MIT-LICENSE for details.

More Repositories

1

json_builder

Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. JSON Builder is here to help.
Ruby
244
star
2

itunes

A Ruby wrapper around the iTunes API that lets you search for any sort of data that is available on the iTunes store.
Ruby
122
star
3

cmd-enter

Every textarea should let you submit comments by pressing cmd-enter or ctrl-enter. For every site that doesn't support it, a kitten weeps. Here's to making less kittens weep.
JavaScript
36
star
4

wink

A Ruby wrapper for the Wink Hub API.
Ruby
18
star
5

mail_gate

Ruby
11
star
6

unifi

Collect your Unifi client data every 15 seconds and send it to an InfluxDB instance.
Go
10
star
7

wink-alfred

Alfred workflow for interacting with your Wink Hub
Ruby
4
star
8

serviced

An interface to dealing with the common pain points while dealing with 3rd parties APIs
Ruby
3
star
9

graphql-cursor

Add GraphQL Relay Cursor Pagination with Postgres.
Go
3
star
10

droplet

Droplet is a fully customizable dropdown plugin for jQuery.
JavaScript
3
star
11

html-pipeline-bitly

A HTML Pipeline filter for extracting URLs and making them bit.ly links.
Ruby
2
star
12

tesla_exporter

Go
2
star
13

open-rails-partial-vscode-extension

VS Code extension that supports opening Rails partials found in development from the browser.
TypeScript
2
star
14

dotpath

dotpath gives you utilities to navigate and modify hashes and arrays in Ruby with the JSON path to each value in the hash or array.
Ruby
1
star
15

awair_exporter

Go
1
star
16

garrettb-python

My website in django
Python
1
star
17

garrettb

Personal site
JavaScript
1
star
18

pngdiff

Go tool that will diff images on the fly
Go
1
star
19

textmate-bundle

My TextMate bundle
1
star
20

screenshots

AWS Lambda nodejs functions to generate screenshots and to also compare them.
JavaScript
1
star
21

clientend-python

Python
1
star
22

pagerduty-schedule-cop

Ruby
1
star
23

open-rails-partial-chrome-extension

Chrome extension that supports opening Rails partials found on the page in VS Code
TypeScript
1
star
24

glimpse

1
star
25

pubattlegrounds

Ruby
1
star