Skip to main content

Easy way to use Sass & SCSS with Sanic

Project description

Sanic-sass 0.1.0

A simple and pythonic way to implement Sass & SCSS into Sanic without using webpack!

Features

  • On the fly compiling to speed up development with our middleware.
  • Compile your entire application at once for at production

Examples

Precompiled

from sanic import Sanic
from sanic_sass import SassManifest

webserver = Sanic(name='precompiled')

manifest = SassManifest('/static/css', './css', './hidden', css_type='sass')
manifest.compile_webapp(webserver, register_static=True)

webserver.run(host='0.0.0.0', port=8000)

As middelware

from sanic import Sanic
from sanic_sass import SassManifest

webserver = Sanic(name='middelware')

manifest = SassManifest('/static/css', './css', './hidden', css_type='scss')
manifest.middelware(webserver)

webserver.run(host='0.0.0.0', port=8000, debug=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sanic-sass-0.1.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distributions

sanic_sass-0.1.0-py3.7.egg (5.9 kB view hashes)

Uploaded Source

sanic_sass-0.1.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page