用于Python的出色SASS和SCSS编译
项目描述
sasstastic
用于Python的出色SASS和SCSS编译
安装
pip install sasstastic
运行
sasstastic --help
检查sasstastic是否已安装并获取帮助信息。
用法
定义配置文件 sasstastic.yml
download:
# downloaded files will be saved in this directory
dir: styles/.libs
sources:
# download a font css file from google fonts and save it to goog-fonts.css
- url: >
https://fonts.googleapis.com/css?
family=Merriweather:400,400i,700,700i|Titillium+Web|Ubuntu+Mono&display=swap
to: google-fonts.css
# download a style sheet from select2, this will be saved to "select2.css" as
# the name can be inferred from the url
- url: 'https://raw.githubusercontent.com/select2/select2/4.0.13/dist/css/select2.css'
# download the full bootstrap 4 bundle and extract the scss files to the bootstrap/ directory
- url: https://github.com/twbs/bootstrap/archive/v4.4.1.zip
extract:
'bootstrap-4.4.1/scss/(.+)$': bootstrap/
# SCSS and SASS files will be build from this directory
build_dir: styles/
# and saved to this directory
output_dir: css/
# the output directory "css/" will be deleted before all builds
wipe_output_dir: true
然后运行 sasstastic
来构建您的sass文件。
注意
- 如果
sasstastic.yml
文件不在当前工作目录中,您可以将其路径作为参数传递给sasstastic,例如sasstastic path/to/sasstastic.yml
或只是sasstastic path/to/
- 默认情况下,在
sasstastic.yml
中定义的路径:download.dir
,build_dir
和output_dir
是相对于sasstastic.yml
文件的**相对路径** - 您可以使用CLI的
-o
参数覆盖输出目录ouput_dir
,有关更多信息,请参阅sasstastic --help
- sasstastic可以在“开发”或“生产”模式下构建
- 在 开发 模式下,CSS不会压缩,会创建一个映射文件,并将
build_dir
和download.dir
中的所有文件复制到output_dir
中,以便映射文件可以正确工作 - 在 生产 模式下,CSS会压缩,不会将其他文件添加到
output_dir
- 在 开发 模式下,CSS不会压缩,会创建一个映射文件,并将
项目详情
下载文件
下载适合您平台的文件。如果您不确定要选择哪个,请了解更多关于 安装包 的信息。
源分布
sasstastic-0.0.2.tar.gz (12.0 kB 查看哈希值)
构建版本
sasstastic-0.0.2-py3-none-any.whl (13.3 kB 查看哈希值)
关闭
sasstastic-0.0.2.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 38069d50031475180815030e6cdfdc2aba025b4f7bc9fdc5d26e560136b6b730 |
|
MD5 | c1f0b5bc15868ee7284fcb7f5bd4fd14 |
|
BLAKE2b-256 | b94485a57893d86e0705538a526f01696d8e5e06de806ef8bba8265eb123e2d8 |
关闭
sasstastic-0.0.2-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 2c7b3fbdf197a57d535a53375133e80f1c2f014e054915595ca45fa2a925b4f4 |
|
MD5 | 7604d4272c59cb1c242f8a7723bb26b2 |
|
BLAKE2b-256 | b9275883511f48843b113574784264ab4c2b5517de332b4bdd8a5fef99e11d2d |