Skip to content

Commit

Permalink
Don't try to generate CSS files from SASS
Browse files Browse the repository at this point in the history
* ruby-sass is not installed on the server
* we commit compiled versions of SASS files
* currently, the 'collectstatic' command fails
  on server

Refs #832
  • Loading branch information
berkerpeksag committed Sep 19, 2017
1 parent df7b607 commit 62b52ec
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
6 changes: 3 additions & 3 deletions pydotorg/settings/local.py
Expand Up @@ -31,9 +31,9 @@
# have a sass compiler installed at all during local development if you aren't
# adjusting the CSS at all. Comment this out or adjust it to suit your local
# environment needs if you are working with the CSS.
PIPELINE['COMPILERS'] = (
'pydotorg.compilers.DummySASSCompiler',
)
# PIPELINE['COMPILERS'] = (
# 'pydotorg.compilers.DummySASSCompiler',
# )
# Pass '-XssNNNNNk' to 'java' if you get 'java.lang.StackOverflowError' with
# yui-compressor.
# PIPELINE['YUI_BINARY'] = '/usr/bin/java -Xss200048k -jar /usr/share/yui-compressor/yui-compressor.jar'
Expand Down
20 changes: 12 additions & 8 deletions pydotorg/settings/pipeline.py
Expand Up @@ -5,7 +5,7 @@
PIPELINE_CSS = {
'style': {
'source_filenames': (
'sass/style.scss',
'sass/style.css',
),
'output_filename': 'stylesheets/style.css',
'extra_context': {
Expand All @@ -15,7 +15,7 @@
},
'mq': {
'source_filenames': (
'sass/mq.scss',
'sass/mq.css',
),
'output_filename': 'stylesheets/mq.css',
'extra_context': {
Expand All @@ -24,7 +24,7 @@
},
'no-mq': {
'source_filenames': (
'sass/no-mq.scss',
'sass/no-mq.css',
),
'output_filename': 'stylesheets/no-mq.css',
'extra_context': {
Expand Down Expand Up @@ -58,11 +58,15 @@
PIPELINE = {
'STYLESHEETS': PIPELINE_CSS,
'JAVASCRIPT': PIPELINE_JS,
'COMPILERS': (
'pipeline.compilers.sass.SASSCompiler',
),
# TODO: ruby-sass is not installed on the server since
# https://github.com/python/psf-salt/commit/044c38773ced4b8bbe8df2c4266ef3a295102785
# and we pre-compile SASS files and commit them into codebase so we
# don't really need this. See issue #832.
# 'COMPILERS': (
# 'pipeline.compilers.sass.SASSCompiler',
# ),
'CSS_COMPRESSOR': 'pipeline.compressors.yui.YUICompressor',
'JS_COMPRESSOR': 'pipeline.compressors.yui.YUICompressor',
'SASS_BINARY': 'cd %s && exec /usr/bin/env sass' % os.path.join(BASE, 'static'),
'SASS_ARGUMENTS': '--quiet --compass --scss -I $(dirname $(dirname $(gem which susy)))/sass'
# 'SASS_BINARY': 'cd %s && exec /usr/bin/env sass' % os.path.join(BASE, 'static'),
# 'SASS_ARGUMENTS': '--quiet --compass --scss -I $(dirname $(dirname $(gem which susy)))/sass'
}

0 comments on commit 62b52ec

Please sign in to comment.