Package: django-sass-compiler
django-sass-compilerSimplify the use ofSassin DjangoUsinglibsass, compile all.scssfiles found in the paths defined insettings.STATICFILES_FINDERSQuickstart1.- It's available onPyPI, so you can install it usingpippip install django-sass-compiler2.- Adddjango_sass_compilerto yourINSTALLED_APPSINSTALLED_APPS=[...,'django_sass_compiler',]3.- Runsass-compilerpython manage.py sass-compileror combine withrunservercommand, useful with--watchargument.python manage.py runserver & python manage.py sass-compiler --watchArguments:All arguments are optional and combinable-s, --styleCoding style of the compiled result. choose one of:'nested','expanded'(default),'compact','compressed'You can also define this argument insettings.SASS_COMPILER_STYLEenvironment variable.SASS_COMPILER_STYLE = 'compressed'-p, --precisionSets the number of digits of precision. 8 by default.You can also define this argument insettings.SASS_COMPILER_PRECISIONenvironment variable.SASS_COMPILER_PRECISION = 5-nb, --no-buildDon't createbuildfolder.app/
  |- static/
     |- app/
        |- scss/
           |- style.scss
        |- css/
           |- style.cssinsteadapp/
  |- static/
     |- app/
        |- scss/
           |- style.scss
        |- build/
           |- css/
              |- style.cssYou can also define this argument insettings.SASS_COMPILER_NO_BUILDenvironment variable.SASS_COMPILER_NO_BUILD = True-m, --mapBuild a source map.You can also define this argument insettings.SASS_COMPILER_MAPenvironment variable.SASS_COMPILER_MAP = True-c, --cleanRemove old files before new compilation.NOTE: This action will only take effect on current destination folder (--no-build).You can also define this argument insettings.SASS_COMPILER_CLEANenvironment variable.SASS_COMPILER_CLEAN = True-w, --watchWatch and compile files when.scssfiles are changed.You can also define this argument insettings.SASS_COMPILER_WATCHenvironment variable.SASS_COMPILER_WATCH = True-i, --ignoreIgnore files or directories matching this glob-style pattern.
Use multiple times to ignore more.NOTE: All patterns will applied in the path since thestaticfolder to the file name.Example:To ignoreapps/app/static/app/scss/style.scssthe longest path would be:python manage.py sass-compiler --ignore=app/scss/style.scssorpython manage.py sass-compiler -i=**/**/style.scssor some other glob-style pattern.You can also define list paths to ignore insettings.SASS_COMPILER_IGNOREenvironment variable.SASS_COMPILER_IGNORE = [
   'app/scss/style.scss',
   'app/scss/test/*'
]@importTo @import.scssfiles you must use absolute paths unless the files are at the same or less level, in that case you can use relative pathssome-app/
  |- static/
     |- some-app/
        |- scss/
            |- pages
                |- _timeline.scss
            |- _colors.scss
            |- style.scss
other-app/
  |- static/
     |- other-app/
        |- scss/
            |- _variables.scsssome-app/style.scss@import'other-app/scss/variables';@import'pages/timeline';@import'colors'###WRONG###@import'../../variables';OutputsStandard output:$ python manage.py sass-compilerapp/
  |- static/
     |- app/
        |- scss/
           |- _colors.scss
           |- style.scss
        |- build/
           |- css/
              |- style.cssWith some argument output:python manage.py sass-compiler --style=compressed --no-build --mapapp/
  |- static/
     |- app/
        |- scss/
           |- _colors.scss
           |- style.scss
        |- css/
           |- style.min.css
           |- style.css.mapLicensingThe project is licensed under theBSD License.