Package: scss-compile
scss-compileA CLI for compiling SCSS files to CSS, and associated pre-commit hook.This CLI is a small wrapper aroundlibsass-python,
which also aims to be compatible withpre-commit,
and provide a pre-commit hook.NOTE: The package in on alpha release, but looks to be working as intended,
and will be trialled insphinx-panels,
and thensphinx-book-theme.InstallationTo use directly as a CLI:pip install scss-compilescss-compile --helpTo useviapre-commit:Add to your.pre-commit-config.yaml-repo:https://github.com/executablebooks/scss-compilerev:v0.1.0hooks:-id:scss-compileargs:[--config=config.yml]# optionalConfigurationYou can can configure the compilation directlyviathe CLI or using a configuration file
(simply replace-with_):$scss-compile--helpUsage: scss-compile [OPTIONS] [PATHS]...Compile all SCSS files in the paths provided.For directories; include all non-partial SCSS files, and for files; ifpartial, include all adjacent, non-partial, SCSS files.Options:--recurse / --no-recurse        For directories, include files in sub-folders.  [default: True]-d, --partial-depth INTEGER     For partial files (starting '_') include allSCSS files up 'n' parent folders  [default:0]-s, --stop-on-error             Stop on the first compilation error.-e, --encoding TEXT             [default: utf8]-f, --output-format [nested|expanded|compact|compressed][default: compressed]-m, --sourcemap                 Output source map.-h, --hash-filenames            Add the content hash to filenames:<filename><hash-prefix><hash>.css (oldhashes will be removed).--hash-prefix TEXT              Prefix to use for hashed filenames.[default: #]-t, --translate TEXT            Source to output path translations, e.g.'src/scss:dist/css' (can be used multipletimes)-p, --precision INTEGER         precision for numbers.  [default: 5]-q, --quiet                     Remove stdout logging.-v, --verbose                   Increase stdout logging.--exit-code INTEGER             Exit code when files changed.  [default: 2]--no-git                        Do not add new files to a git index.--test-run                      Do not delete/create any files.--config FILE                   Read default configuration from a file(allowed extensions: .json, .toml, .yml,.yaml.)--help                          Show this message and exit.--configcan point to any of three file-formats:config.json:{"scss-compile":{"precision":5,"sourcemap":true,"hash_filenames":true,"output_format":"compressed","partial_depth":1,"translate":["tests/example_sass:tests/output_css"]}}config.toml:[scss-compile]precision=5sourcemap=truehash_filenames=trueoutput_format="compressed"partial_depth=1translate=["tests/example_sass:tests/output_css"]config.yml/config.yaml:scss-compile:precision:5sourcemap:truehash_filenames:trueoutput_format:compressedpartial_depth:1translate:["tests/example_sass:tests/output_css"]UsageIf you simply specify a normal SCSS file, then the CSS file will be output in the same folder:$scss-compilescss/file.scssscss/
    file.scss
    file.cssIf you use thesourcemapoption, then a sourcemap will also be output,
and asourceMappingURLcomment added to the CSS:$scss-compilescss/file.scss--sourcemapscss/
    file.scss
    file.css
    file.scss.map.jsonIf you use thehash_filenamesoption, then the CSS filename will include the content hash (and any existing file with a different hash will be removed):$scss-compilescss/file.scss--hash-filenamesscss/
    file.scss
    file#beabd761a3703567b4ce06c9a6adde55.cssIf you specify a partial file, i.e. ones beginning_usedvia@importand@use,
then all "normal" SCSS files in that folder will be compiled.
If you also use thepartial-depthoption, then files in parent folders will also be compiled.$scss-compilescss/imports/_partial.scss--partial-depth=1scss
   /imports
       _partial.scss
    file.scss
    file.cssIf you set the--translateoption, then the output files will be "translated" to the specified output path
(which will be created if it does not yet exist):$scss-compilescss/file.scss--translate"src/scss:dist/css"--sourcemapsrc/scss/
    file.scss
dist/css/
    file.css
    file.scss.map.jsonIf you specify a directory, then it will first find all SCSS files in that directory,
and recursive sub-folders (unless--no-recurseis used), then treat each individual file as above.DevelopmentTo run the tests:pip install toxtox -e py37To test out the CLI:tox -e py37-cliFor code style:pip install pre-commitpre-commit run --all