SASS Compiler for Lektor,Thats based on Libsass.
lektor-scsscompile的Python项目详细描述
scsscompile
自动编译sass的lektor的scss编译器。
使用libsass并查找.scss/.sass文件(忽略以下划线开头的部分文件,例如'u testfile.scss'), 作为构建过程的一部分编译它们。它只在需要时重建(文件已更改、导入的文件已更改或配置已更改)。当启动开发服务器时,它会在后台监视文件的更改,并在需要时重建它们。
安装
您可以使用Lektor的安装程序安装插件:
lektor plugins add lektor-scsscompile
或者手动将插件添加到lektorproject文件的packages部分:
[packages] lektor-scsscompile =1.2.4
用法
要启用scsscompile,请在启动开发时传递scsscompile
标志
服务器或运行生成时:
lektor build -f scsscompile
lektor build -f scsscompile
该插件具有以下设置,您可以根据需要进行调整:
parameter | default value | description |
---|---|---|
source_dir | asset_sources/scss/ | the directory in which the plugin searchs for sass files (subdirectories are included) |
output_dir | assets/css/ | the directory the compiled css files get place at |
output_style | compressed | coding style of the compiled result. choose one of: 'nested', 'expanded', 'compact', 'compressed' |
source_comments | False | whether to add comments about source lines |
precision | 5 | precision for numbers |
具有默认配置的示例文件可以在configs/scsscompile.ini