Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Vepnar/Sanic-Sass
Implement Sass & SCSS to sanic
https://github.com/Vepnar/Sanic-Sass
python3 sanic sanic-framework sanic-middleware sass scss
Last synced: 3 months ago
JSON representation
Implement Sass & SCSS to sanic
- Host: GitHub
- URL: https://github.com/Vepnar/Sanic-Sass
- Owner: Vepnar
- License: mit
- Created: 2020-05-08T08:37:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-21T15:42:02.000Z (over 3 years ago)
- Last Synced: 2024-07-18T09:17:53.689Z (4 months ago)
- Topics: python3, sanic, sanic-framework, sanic-middleware, sass, scss
- Language: Python
- Homepage: https://pypi.org/project/sanic-sass/
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-sanic - Sanic-Sass
README
# 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# Installation
## With pip
`pip install sanic-sass`## With setuptools & git
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`# Examples
### Precompiled
```py
from sanic import Sanic
from sanic_sass import SassManifestwebserver = 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)
```### As middelware
```py
from sanic import Sanic
from sanic_sass import SassManifestwebserver = 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)
```