begriffs / styleguide_rails

generate a living styleguide with one command
MIT License
69 stars 10 forks source link

Make the styleguide:widget generator add css file too #46

Closed begriffs closed 11 years ago

begriffs commented 11 years ago

Right now it generates app/views/styleguide/widgets/_bla.html.[template] but it should also generate a blank app/assets/stylesheets/widgets/_bla.css.[template]. The only difficult thing is to detect what css templating language is used, whether scss or sass or none at all.

begriffs commented 11 years ago

@joshuarh can you help me with this one?

losingkeys commented 11 years ago

So this one is a little more tricky because we might be stepping on toes if we take the same route as before. Before we were adding some example markup to app/views/styleguide/widgets/, but where would we put the stylesheet? I'm guessing the example widget would use css from app/assets/stylesheets/, but should we make a widgets directory for them? And new widgets stylesheets? partials? I haven't looked at how the application's css/js is loaded now, but however this is done (making stylesheets/widgets/whatever.css.scss might be just fine), we should make sure it doesn't confuse the user, though I suppose we could add something to the README too...