texlive-fonts-extra-links \
fonts-noto-core fonts-noto-extra
+# Install dart-sass for compiling SCSS.
+ARG DART_SASS_VERSION=1.108.1
+RUN arch=$(dpkg --print-architecture | sed 's/amd64/x64/') && \
+ curl -fsSL "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-${arch}.tar.gz" \
+ | tar xz -C /opt
COPY requirements/requirements.txt requirements.txt
'output_filename': 'js/widget.min.js',
},
},
- 'CSS_COMPRESSOR': None,
'JS_COMPRESSOR': 'pipeline.compressors.jsmin.JSMinCompressor',
- 'COMPILERS': (
- 'libsasscompiler.LibSassCompiler',
- )
+ 'COMPILERS': ('pipeline.compilers.sass.SASSCompiler',),
+ 'SASS_BINARY': '/opt/dart-sass/sass',
+ 'SASS_ARGUMENTS': '--embed-source-map --embed-sources',
+ # Compress CSSwith a second run of dart-sass.
+ 'CSS_COMPRESSOR': 'pipeline.compressors.cssmin.CSSMinCompressor',
+ 'CSSMIN_BINARY': '/opt/dart-sass/sass',
+ 'CSSMIN_ARGUMENTS': '--stdin --style=compressed --no-source-map',
}
STATICFILES_STORAGE = 'fnpdjango.pipeline_storage.GzipPipelineManifestStorage'
-# PIPELINE_PYSCSS_BINARY = '/usr/bin/env pyscss'
-# PIPELINE_PYSCSS_ARGUMENTS = ''
-
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',