로컬 파일을 검사하고 포함하여 compass config.rb 변수/상수를 재정의 할 방법을 찾고 있습니다. compass를 호출 할 때 사용할 config 파일을 정의하는 현재 옵션이 아니라이 방법을 사용하면 모든 개발자와 시스템을위한 기본값 집합을 가질 수 있고 devs가 자신의 로컬 설정에 필요한 경우이를 무시할 수 있습니다. 불행히도 루비에 대해 전혀 알지 못하고 파일에 대한 간단한 점검과 config.rb에서의 요구로 인해 원래 설정을 덮어 쓰는 것처럼 보이지 않습니다. 내 현재 코딩 시도는 아래와 같습니다. 누군가 내가 여기서 잘못하고있는 것을 나에게 설명해 줄 수 있니?루비 나침반 구성 파일 재정의
config.rb
# Compass configuration file.
# Require any additional compass plugins here.
# Sass/Compass paths
http_path = "/"
css_dir = "../../web/stylesheets"
sass_dir = "sass"
images_dir = "../../web/images"
javascripts_dir = "javascript"
fonts_dir = "fonts"
# Output style environment can be forced on build using -e
output_style = (environment == :production) ? :compressed : :expanded
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
# Disable the compass cache method - we use our own methods.
asset_cache_buster = :none
line_comments = false
color_output = false
preferred_syntax = :scss
# Define the location of a the compass/sass cache directory.
cache_path = "/tmp/compass-cache"
# Add shared sass path to make it easier to include assets.
add_import_path = "../shared/sass"
# TODO: Check for a local config file - use this to extend/override this config file.
$localConfig = File.join(File.dirname(__FILE__), "config.local.rb")
require $localConfig if File.exist?($localConfig) and File.file?($localConfig)
config.local.rb
아이디어는 우리가입니다 ...
# Additional custom Compass Configuration file.
# Require any additional compass plugins here.
line_comments = true
cache_path = "/Users/jwestbrook/Sites/compass-cache"
sass_options = {
:debug_info => true,
:sourcemap => true
}
enable_sourcemaps = true
당신은 이것을위한 해결책을 찾았습니까? – ojrask
@ojrask 지연에 대해 죄송합니다. 나는 직장에서 개발자와 함께 해결책을 찾아 냈다. 그러나이 코드는 프로젝트와 밀접하게 묶여 있기 때문에 골라 낼 수 있습니다. 그러나 저는 여러분에게 우리가 한 방향을 보여주기 위해 간단한 예를 모으려고 노력할 것입니다. – jwestbrook