Skip to content

Commit

Permalink
Merge pull request #25 from sakuro/asset-pipeline-2
Browse files Browse the repository at this point in the history
asset pipeline patch that uses app/assets instead of vendor/assets
  • Loading branch information
Dan Croak committed Jul 4, 2011
2 parents 5d1e227 + 48e7dd0 commit 8590953
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 5 deletions.
10 changes: 7 additions & 3 deletions README.md
Expand Up @@ -12,7 +12,7 @@ Flutie is recommended to be run as a gem and included in your Gemfile:

gem "flutie"

After you've bundled, run the installer:
After you've bundled, if you are using Rails < 3.1, run the installer:

rake flutie:install

Expand All @@ -24,6 +24,10 @@ Click on the "Default styles" link to view the same markup with a barebones layo

To upgrade, bump the gem version in your Gemfile, and then run 'rake flutie:install' again to get the latest changes moved into your application.

If you are using rails 3.1 or greater with asset pipelining enabled, you don't need to run the installer. Simply add
= require 'flutie'
in the application stylesheet manifest (app/assets/stylesheets/applicaion.css).

Usage
-----

Expand Down Expand Up @@ -72,10 +76,10 @@ Fork away and create a "Github Issue":http://github.com/thoughtbot/flutie/issues
Development
-----------

The actual stylesheet source files are sass, so edit the files in public/stylesheets/sass/flutie.
The actual stylesheet source files are sass, so edit the files in app/assets/stylesheets/sass/flutie.
To rebuild the normal scss run:

sass -C --update public/stylesheets/sass/flutie:public/stylesheets
sass -C --update app/assets/stylesheets/sass/flutie:app/assets/stylesheets

You can run a server which will allow you to view the flutie styleguide locally:

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 7 additions & 2 deletions lib/tasks/flutie.rake
Expand Up @@ -11,7 +11,12 @@ directory = File.dirname(__FILE__)
namespace :flutie do
desc 'install flutie stylesheets into public/ directory'
task :install => :environment do
# Copy the flutie stylesheets into rails_root/public/stylesheets/sass
copy_files("../../public/stylesheets", "/public", directory)
if Rails.application.config.respond_to?(:assets) && Rails.application.config.assets.enabled
# No copy is needed when asset pipelining is enabled
puts "Flutie stylesheets are provided via asset pipelining."
else
# Copy the flutie stylesheets into rails_root/public/flutie
copy_files("../../app/assets/stylesheets", "/public/flutie", directory)
end
end
end
1 change: 1 addition & 0 deletions server.rb
Expand Up @@ -3,6 +3,7 @@

set :views, ['app/views']
set :static, true
set :public, 'app/assets'

helpers do
def stylesheet_link_tag(name)
Expand Down

0 comments on commit 8590953

Please sign in to comment.