Skip to content

Instantly share code, notes, and snippets.

@bigsweater
Created December 31, 2013 20:31
Show Gist options
  • Save bigsweater/8201936 to your computer and use it in GitHub Desktop.
Save bigsweater/8201936 to your computer and use it in GitHub Desktop.
My own config.rb recipe for web dev projects
require 'susy'
require 'animation'
#================================================#
#Section: Default Properties #
#================================================#
project_type = :stand_alone
relative_assets = true
disable_warnings = false
preferred_syntax = :scss
sprite_engine = :chunky_png
chunky_png_options = {:compression => Zlib::BEST_COMPRESSION}
#================================================#
#Section: Http Paths #
#================================================#
http_path = ''
http_javascripts_path = 'inc/js'
http_stylesheets_path = 'inc/css'
http_fonts_path = 'inc/fonts'
http_images_path = 'inc/images'
http_generated_images_path = http_images_path
#================================================#
#Section: Compass Directories #
#================================================#
javascripts_dir = 'inc/js/src'
css_dir = 'inc/css'
sass_dir = 'inc/css/src'
images_dir = 'inc/images'
generated_images_dir = 'inc/images'
fonts_dir = 'inc/fonts'
cache_dir = 'inc/.sass-cache'
#================================================#
#Section: Compass Paths #
#================================================#
javascripts_path = javascripts_dir
css_path = css_dir
sass_path = sass_dir
images_path = images_dir
cache_path = cache_dir
generated_images_path = images_path
fonts_path = fonts_dir
sprite_load_path = images_path
#================================================#
#Section: Environment Rules #
#================================================#
# if (defined?(environment)) && environment != nil
# environment = :production
# puts "WARNING: environment property not set, using :production as default.\n"
# end
environment = :production
sass_options = { :quiet => true } # Sass compiles fail for me on simple warnings after an update, so I did this.
if environment == :development
output_style = :expanded
line_comments = true
elsif environment == :production
output_style = :compressed
line_comments = false
sass_options = { :cache_location => cache_dir, :debug_info => false }
debug_info = false
enable_sourcemaps = false
on_stylesheet_saved do |filename|
if File.exists?(filename)
FileUtils.rm_rf(filename + '.map') #Removing development sourcemap file
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment