jlong / serve

Serve is a small Rack-based web server and rapid prototyping framework for Web applications (specifically Rails apps). Serve is meant to be a lightweight version of the Views part of the Rails MVC. This makes Serve an ideal framework for prototyping Rails applications or creating simple websites. Serve has full support for Rails-style partials and layouts.
http://get-serve.com
Other
836 stars 90 forks source link

Support for Compass plugins? #45

Closed nathos closed 13 years ago

nathos commented 13 years ago

Does Serve support Compass plugins like Susy & 960.gs? I'm not sure where to require them so they can work properly.

adamstac commented 13 years ago

You would require the Compass plugins in config.rb (the Compass config file) as normal. If you are using Bundler, you would also need to add them to your Gemfile and have the gem (plugin) installed.

nathos commented 13 years ago

Thanks. Looks like it's a two-stepper:

  1. add the appropriate gem to the Gemfile
  2. add the appropriate require to 'config.ru' (after "require 'compass' ")

Doing both I was able to get both the 960.gs and Susy plugins to work correctly.

jlong commented 13 years ago

I believe the standard place to put the requires is in the compass.config.

nathos commented 13 years ago

Ah, thank you. I think I tried that first, but was initially missing the line in the Gemfile. To clarify for anyone else:

  1. add the appropriate gem to the Gemfile (e.g.: gem 'compass-960-plugin' )
  2. add the appropriate require to 'config.compass' (e.g.: require 'ninesixty' )
disusered commented 13 years ago

Thank you for this tip, it helped me add Susy to this latest project!

avocade commented 12 years ago

Added the susy plugin gem to Gemfile, and changed the compass.config with require 'susy' on top. Still getting a 'Syntax error" when using @import 'susy'; in my .scss file in /stylesheets.

PS. I've cleared the tmp folder. Using latest edge serve.

UPDATE: Seems it resolved itself after I added @import 'susy'; also to the screen.scss default template... I'm always a bit concerned when things work out after seemingly doing nothing to fix it... ;)