2017-02-13 4 views
0

내 문제는 Django-Bower + Foundation 5 + SASS과 같은 맥락입니다. foundationscss에서 css으로 컴파일하려고합니다. 문제는 내가 RuntimeError 다음 발생하고있어 점이다장고 - 파이프 라인을 사용하여 Foundation-sites의 SCSS 파일에서 CSS를 빌드 할 때 RuntimeError

/home/hakim/.gem/ruby/2.4.0/gems/sass-3.4.23/lib/sass/exec/sass_scss.rb:287:in `watch_or_update': File /home/hakim/github/myquotes/static/quotes/app.css doesn't exist. (RuntimeError) 
    Did you mean: sass --update /home/hakim/github/myquotes/static/quotes/app.scss:/home/hakim/github/myquotes/static/quotes/app.css 
    from /home/hakim/.gem/ruby/2.4.0/gems/sass-3.4.23/lib/sass/exec/sass_scss.rb:51:in `process_result' 
    from /home/hakim/.gem/ruby/2.4.0/gems/sass-3.4.23/lib/sass/exec/base.rb:52:in `parse' 
    from /home/hakim/.gem/ruby/2.4.0/gems/sass-3.4.23/lib/sass/exec/base.rb:19:in `parse!' 
    from /home/hakim/.gem/ruby/2.4.0/gems/sass-3.4.23/bin/sass:13:in `<top (required)>' 
    from /home/hakim/.gem/ruby/2.4.0/bin/sass:22:in `load' 
    from /home/hakim/.gem/ruby/2.4.0/bin/sass:22:in `<main>' 

정적 파일은 os.path.join(BASE_DIR, 'static')에 저장됩니다.

# Manage static files with pipeline 
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage' 

# Where to generate CSS from SCSS 
STATIC_ROOT = os.path.join(BASE_DIR, 'static') 

# Specify SCSS files to be compiled to CSS 
PIPELINE = { 
    'STYLESHEETS': { 
     'librairies': { 
      'source_filenames': (
       'quotes/app.scss', 
      ), 
      'output_filename': 'quotes/app.css', 
     }, 
    }, 
    'COMPILERS': (
     'pipeline.compilers.sass.SASSCompiler', 
    ), 
    'SASS_ARGUMENTS': "--trace --update -I '%s'" % os.path.join(
     BOWER_COMPONENTS_ROOT, 
     'bower_components', 
     'foundation', 
     'scss' 
    ), 
} 

app.scss@import 'foundation'; 포함

여기 내 setting.py의 관련 부분이다.

답변

0

app.scss (기초를 가져올 때)의 폴더 계층을 고려하는 것을 잊어 버린이 문제를 해결할 수있었습니다. 이 파일을 다운로드받은 foundation-sites과 함께 /static에 넣고 아래 내용을 설정하면 제대로 작동 할 수있었습니다.

@import 'foundation-sites/scss/settings/_settings.scss'; 
@import 'foundation-sites/scss/foundation.scss'; 

@include foundation-everything;