- On the fly compiling to speed up development with our middleware.
- Compile your entire application at once for at production
pip install sanic-sass
Clone the newest version from github.
git clone https://github.com/Vepnar/Sanic-Sass.git
Cd into the new directory.
cd Sanic-Sass
Run setuptools.
setup.py install --user
from sanic import Sanic
from sanic_sass import SassManifest
webserver = Sanic(name='precompiled')
manifest = SassManifest('/static/css', './static/sass', './compiled', css_type='sass')
manifest.compile_webapp(webserver, register_static=True)
webserver.run(host='0.0.0.0', port=8000)
from sanic import Sanic
from sanic_sass import SassManifest
webserver = Sanic(name='middelware')
manifest = SassManifest('/static/css', './static/scss', './compiled', css_type='scss')
manifest.middelware(webserver)
webserver.run(host='0.0.0.0', port=8000, debug=True)