1
0
Fork 0

Add Sass support

merge-requests/451/head
Nikos Roussos 2017-12-24 21:15:03 +02:00
parent ecb38787e0
commit 334958e225
No known key found for this signature in database
GPG Key ID: BADFF1767BA7C8E1
7 changed files with 10 additions and 3 deletions

View File

@ -20,6 +20,6 @@ indent_size = 2
indent_style = space indent_style = space
indent_size = 2 indent_size = 2
[*.{css,js}] [*.{scss,css,js}]
indent_style = space indent_style = space
indent_size = 4 indent_size = 4

2
.gitignore vendored
View File

@ -24,6 +24,8 @@ media
/staticfiles/* /staticfiles/*
node_modules node_modules
yarn-error.log yarn-error.log
*.css.map
.sass-cache
# Celery # Celery
celerybeat-schedule celerybeat-schedule

View File

@ -13,6 +13,7 @@ test:
- pytest - pytest
- eslint 'network/static/js/*.js' - eslint 'network/static/js/*.js'
- stylelint 'network/static/css/*.css' - stylelint 'network/static/css/*.css'
- stylelint 'network/static/css/*.scss'
stage: stage:
stage: deploy stage: deploy

View File

@ -2,7 +2,7 @@ FROM centos:7
RUN yum makecache RUN yum makecache
RUN yum -y install epel-release RUN yum -y install epel-release
RUN yum -y install python python-pip python-devel git gcc libjpeg-turbo-devel \ RUN yum -y install python python-pip python-devel git gcc libjpeg-turbo-devel \
libxml2-devel libxslt-devel mysql-devel mysql libxml2-devel libxslt-devel mysql-devel mysql ruby-sass
RUN yum -y clean all RUN yum -y clean all
RUN pip install --upgrade pip RUN pip install --upgrade pip

View File

@ -1,6 +1,6 @@
FROM fedora:latest FROM fedora:latest
RUN dnf -y install python python-pip python-devel git gcc libjpeg-turbo-devel findutils \ RUN dnf -y install python python-pip python-devel git gcc libjpeg-turbo-devel findutils \
libxml2-devel libxslt-devel mysql-devel mysql npm redhat-rpm-config libxml2-devel libxslt-devel mysql-devel mysql npm redhat-rpm-config ruby-sass
RUN dnf -y clean all RUN dnf -y clean all
RUN npm install -g eslint stylelint RUN npm install -g eslint stylelint

View File

@ -10,6 +10,7 @@ var lintPathsJS = [
]; ];
var lintPathsCSS = [ var lintPathsCSS = [
'network/static/css/*.scss',
'network/static/css/*.css' 'network/static/css/*.css'
]; ];

View File

@ -148,6 +148,9 @@ COMPRESS_CSS_FILTERS = [
'compressor.filters.css_default.CssAbsoluteFilter', 'compressor.filters.css_default.CssAbsoluteFilter',
'compressor.filters.cssmin.rCSSMinFilter' 'compressor.filters.cssmin.rCSSMinFilter'
] ]
COMPRESS_PRECOMPILERS = (
('text/scss', 'sass --scss {infile} {outfile}'),
)
# App conf # App conf
ROOT_URLCONF = 'network.urls' ROOT_URLCONF = 'network.urls'