Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #25 from sakuro/asset-pipeline-2

asset pipeline patch that uses app/assets instead of vendor/assets
  • Loading branch information...
commit 859095375351f6c3048c64980f96c6cdfcbcc2b3 2 parents 5d1e227 + 48e7dd0
@croaky croaky authored
View
10 README.md
@@ -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
@@ -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
-----
@@ -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:
View
0  public/stylesheets/flutie.css → app/assets/stylesheets/flutie.css
File renamed without changes
View
0  ...ic/stylesheets/sass/flutie/_defaults.scss → ...ts/stylesheets/sass/flutie/_defaults.scss
File renamed without changes
View
0  public/stylesheets/sass/flutie/_forms.scss → ...ssets/stylesheets/sass/flutie/_forms.scss
File renamed without changes
View
0  public/stylesheets/sass/flutie/_lists.scss → ...ssets/stylesheets/sass/flutie/_lists.scss
File renamed without changes
View
0  public/stylesheets/sass/flutie/_reset.scss → ...ssets/stylesheets/sass/flutie/_reset.scss
File renamed without changes
View
0  public/stylesheets/sass/flutie/_screen.scss → ...sets/stylesheets/sass/flutie/_screen.scss
File renamed without changes
View
0  public/stylesheets/sass/flutie/_tables.scss → ...sets/stylesheets/sass/flutie/_tables.scss
File renamed without changes
View
0  public/stylesheets/sass/flutie/_type.scss → ...assets/stylesheets/sass/flutie/_type.scss
File renamed without changes
View
0  public/stylesheets/sass/flutie/flutie.scss → ...ssets/stylesheets/sass/flutie/flutie.scss
File renamed without changes
View
9 lib/tasks/flutie.rake
@@ -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
View
1  server.rb
@@ -3,6 +3,7 @@
set :views, ['app/views']
set :static, true
+set :public, 'app/assets'
helpers do
def stylesheet_link_tag(name)
Please sign in to comment.
Something went wrong with that request. Please try again.