Commit 0de0fbb9 by Ned Batchelder

Merge pull request #9519 from edx/ned/sass-import-dot

Add current directory to the sass compilation path.
parents 3c8dbe77 5a3b69ba
...@@ -132,7 +132,10 @@ def compile_coffeescript(*files): ...@@ -132,7 +132,10 @@ def compile_coffeescript(*files):
@task @task
@no_help @no_help
@cmdopts([('debug', 'd', 'Debug mode')]) @cmdopts([
('debug', 'd', 'Debug mode'),
('force', '', 'Force full compilation'),
])
def compile_sass(options): def compile_sass(options):
""" """
Compile Sass to CSS. Compile Sass to CSS.
...@@ -146,6 +149,9 @@ def compile_sass(options): ...@@ -146,6 +149,9 @@ def compile_sass(options):
parts.append("--sourcemap") parts.append("--sourcemap")
else: else:
parts.append("--style compressed --quiet") parts.append("--style compressed --quiet")
if options.get('force'):
parts.append("--force")
parts.append("--load-path .")
for load_path in SASS_LOAD_PATHS + SASS_DIRS.keys(): for load_path in SASS_LOAD_PATHS + SASS_DIRS.keys():
parts.append("--load-path {path}".format(path=load_path)) parts.append("--load-path {path}".format(path=load_path))
......
...@@ -12,7 +12,7 @@ EXPECTED_COFFEE_COMMAND = ( ...@@ -12,7 +12,7 @@ EXPECTED_COFFEE_COMMAND = (
) )
EXPECTED_SASS_COMMAND = ( EXPECTED_SASS_COMMAND = (
"sass --update --cache-location /tmp/sass-cache --default-encoding utf-8 --style compressed" "sass --update --cache-location /tmp/sass-cache --default-encoding utf-8 --style compressed"
" --quiet --load-path common/static --load-path common/static/sass" " --quiet --load-path . --load-path common/static --load-path common/static/sass"
" --load-path lms/static/sass --load-path lms/static/certificates/sass" " --load-path lms/static/sass --load-path lms/static/certificates/sass"
" --load-path cms/static/sass --load-path common/static/sass" " --load-path cms/static/sass --load-path common/static/sass"
" lms/static/sass:lms/static/css lms/static/certificates/sass:lms/static/certificates/css" " lms/static/sass:lms/static/css lms/static/certificates/sass:lms/static/certificates/css"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment