Skip to content

Instantly share code, notes, and snippets.

@laribee
Forked from chriseppstein/readme.md
Created December 28, 2011 03:46

Revisions

  1. @chriseppstein chriseppstein revised this gist Dec 2, 2011. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion application.rb
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,6 @@
    Bundler.require *Rails.groups(:assets => %w(development test))
    end

    stylesheets_directory = "#{Rails.root}/app/assets/stylesheets"
    config.assets.precompile << /(^[^_]|\/[^_])[^\/]*/

    # if you prefer `.sass` over `.scss`.
  2. @chriseppstein chriseppstein revised this gist Oct 4, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion application.rb
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    end

    stylesheets_directory = "#{Rails.root}/app/assets/stylesheets"
    config.assets.precompile << /(^[^]|\/[^])[^\/]*$/
    config.assets.precompile << /(^[^_]|\/[^_])[^\/]*/

    # if you prefer `.sass` over `.scss`.
    config.sass.preferred_syntax = :sass
  3. @chriseppstein chriseppstein revised this gist Oct 2, 2011. 1 changed file with 1 addition and 11 deletions.
    12 changes: 1 addition & 11 deletions application.rb
    Original file line number Diff line number Diff line change
    @@ -3,17 +3,7 @@
    end

    stylesheets_directory = "#{Rails.root}/app/assets/stylesheets"
    config.assets.precompile += Dir.glob("#{stylesheets_directory}/**/*.s[ac]ss*").
    map{|f| f[stylesheets_directory.size+1..-1]}.
    select do |file|
    if config.assets.precompile.include?(file)
    false
    elsif File.basename(file)[0...1] == "_"
    false
    else
    true
    end
    end
    config.assets.precompile << /(^[^]|\/[^])[^\/]*$/

    # if you prefer `.sass` over `.scss`.
    config.sass.preferred_syntax = :sass
  4. @chriseppstein chriseppstein revised this gist Sep 15, 2011. 2 changed files with 11 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -3,4 +3,6 @@ group :assets do
    gem 'coffee-rails', '~> 3.1.0'
    gem 'uglifier'
    gem 'compass', '~> 0.12.alpha'
    # include other compass plugins here. E.g.:
    gem 'compass-susy-plugin', :require => 'susy'
    end
    9 changes: 9 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -10,3 +10,12 @@ During deploy run:

    1. Move your stylesheets from `app/stylesheets` or `public/stylesheets/sass` to `app/assets/stylesheets`.
    2. Rename all non partials to `*.css.s[ac]ss`


    ### Installing Compass Plugins

    1. Gem based plugins: Add plugin to Gemfile
    2. Archive based plugins: unpack the extension into `vendor/plugins/compass_extensions`
    3. (optionally) Install the plugin templates. E.g.

    bundle exec compass install <plugin>
  5. @chriseppstein chriseppstein revised this gist Sep 9, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    ### Super extra minimal Compass to Rails 3.1 bootstrap
    ### Compass is even easier to use in Rails 3.1

    Compass Rails integration is trivial in rails 3.1. The "config/compass.rb" file is optional.
    Compass Rails integration is trivial in rails 3.1. The "config/compass.rb" file is optional now.

    During deploy run:

  6. @chriseppstein chriseppstein revised this gist Sep 9, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ Compass Rails integration is trivial in rails 3.1. The "config/compass.rb" file

    During deploy run:

    rake assets:precompile
    rake assets:precompile

    #### Additional Upgrade instructions

  7. @chriseppstein chriseppstein revised this gist Sep 9, 2011. 2 changed files with 8 additions and 2 deletions.
    3 changes: 3 additions & 0 deletions application.rb
    Original file line number Diff line number Diff line change
    @@ -14,3 +14,6 @@
    true
    end
    end

    # if you prefer `.sass` over `.scss`.
    config.sass.preferred_syntax = :sass
    7 changes: 5 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,11 @@

    Compass Rails integration is trivial in rails 3.1. The "config/compass.rb" file is optional.

    Setup

    During deploy run:

    rake assets:precompile

    #### Additional Upgrade instructions

    1. Move your stylesheets from `app/stylesheets` or `public/stylesheets/sass` to `app/assets/stylesheets`.
    2. Rename all non partials to `*.css.s[ac]ss`
  8. @chriseppstein chriseppstein revised this gist Sep 7, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions application.rb
    Original file line number Diff line number Diff line change
    @@ -3,8 +3,8 @@
    end

    stylesheets_directory = "#{Rails.root}/app/assets/stylesheets"
    config.assets.precompile += Dir.glob("#{asset_directory}/**/*.s[ac]ss*").
    map{|f| f[asset_directory.size+1..-1]}.
    config.assets.precompile += Dir.glob("#{stylesheets_directory}/**/*.s[ac]ss*").
    map{|f| f[stylesheets_directory.size+1..-1]}.
    select do |file|
    if config.assets.precompile.include?(file)
    false
  9. @chriseppstein chriseppstein revised this gist Sep 7, 2011. 2 changed files with 16 additions and 1 deletion.
    15 changes: 14 additions & 1 deletion application.rb
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,16 @@
    if defined?(Bundler)
    Bundler.require *Rails.groups(:assets => %w(development test))
    end
    end

    stylesheets_directory = "#{Rails.root}/app/assets/stylesheets"
    config.assets.precompile += Dir.glob("#{asset_directory}/**/*.s[ac]ss*").
    map{|f| f[asset_directory.size+1..-1]}.
    select do |file|
    if config.assets.precompile.include?(file)
    false
    elsif File.basename(file)[0...1] == "_"
    false
    else
    true
    end
    end
    2 changes: 2 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,8 @@

    Compass Rails integration is trivial in rails 3.1. The "config/compass.rb" file is optional.

    Setup

    During deploy run:

    rake assets:precompile
  10. @chriseppstein chriseppstein revised this gist Sep 1, 2011. 2 changed files with 5 additions and 1 deletion.
    2 changes: 1 addition & 1 deletion application.rb
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,3 @@
    if defined?(Bundler)
    Bundler.require(:default, :assets, Rails.env)
    Bundler.require *Rails.groups(:assets => %w(development test))
    end
    4 changes: 4 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    ### Super extra minimal Compass to Rails 3.1 bootstrap

    Compass Rails integration is trivial in rails 3.1. The "config/compass.rb" file is optional.

    During deploy run:

    rake assets:precompile
  11. @chriseppstein chriseppstein revised this gist Aug 31, 2011. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions application.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    if defined?(Bundler)
    Bundler.require(:default, :assets, Rails.env)
    end
  12. @chriseppstein chriseppstein revised this gist Aug 31, 2011. 3 changed files with 2 additions and 20 deletions.
    2 changes: 1 addition & 1 deletion Gemfile
    Original file line number Diff line number Diff line change
    @@ -2,5 +2,5 @@ group :assets do
    gem 'sass-rails', '~> 3.1.0'
    gem 'coffee-rails', '~> 3.1.0'
    gem 'uglifier'
    gem 'compass'
    gem 'compass', '~> 0.12.alpha'
    end
    15 changes: 0 additions & 15 deletions application.rb
    Original file line number Diff line number Diff line change
    @@ -1,15 +0,0 @@
    module Compass
    RAILS_LOADED = true
    end

    if defined?(Bundler)
    Bundler.require(:default, :assets, Rails.env)
    end

    module MyPrecious
    class Application < Rails::Application
    config.assets.enabled = true
    # that's it!
    config.sass.load_paths << Compass::Frameworks['compass'].stylesheets_directory
    end
    end
    5 changes: 1 addition & 4 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,3 @@
    ### Super extra minimal Compass to Rails 3.1 bootstrap

    Skips all of the nasty and bloated old Compass Rails integration.
    No need for that confusing "config/compass.rb" file, either.

    Note that _this will only work for simple stylesheets_ and probably needs extra configuration for stuff like sprites.
    Compass Rails integration is trivial in rails 3.1. The "config/compass.rb" file is optional.
  13. @mislav mislav revised this gist Aug 31, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    ## Super extra minimal Compass to Rails 3.1 bootstrap
    ### Super extra minimal Compass to Rails 3.1 bootstrap

    Skips all of the nasty and bloated old Compass Rails integration.
    No need for that confusing "config/compass.rb" file, either.
  14. @mislav mislav revised this gist Aug 31, 2011. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    Super extra minimal Compass to Rails 3.1 bootstrap.
    ## Super extra minimal Compass to Rails 3.1 bootstrap

    Skips all of the nasty and bloated old Compass Rails integration.
    No need for that confusing "config/compass.rb" file, either.

    Note that _this will only work for simple stylesheets_ and probably needs extra configuration for stuff like sprites.
  15. @mislav mislav renamed this gist Aug 31, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  16. @mislav mislav created this gist Aug 31, 2011.
    6 changes: 6 additions & 0 deletions Gemfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    group :assets do
    gem 'sass-rails', '~> 3.1.0'
    gem 'coffee-rails', '~> 3.1.0'
    gem 'uglifier'
    gem 'compass'
    end
    15 changes: 15 additions & 0 deletions application.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    module Compass
    RAILS_LOADED = true
    end

    if defined?(Bundler)
    Bundler.require(:default, :assets, Rails.env)
    end

    module MyPrecious
    class Application < Rails::Application
    config.assets.enabled = true
    # that's it!
    config.sass.load_paths << Compass::Frameworks['compass'].stylesheets_directory
    end
    end
    5 changes: 5 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    Super extra minimal Compass to Rails 3.1 bootstrap.

    Skips all of the nasty and bloated old Compass Rails integration.

    Note that _this will only work for simple stylesheets_ and probably needs extra configuration for stuff like sprites.