a3gz / cli-sass2css
Command line SASS to CSS compiler
Installs: 118
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/a3gz/cli-sass2css
Requires
- leafo/scssphp: ^0.7
This package is auto-updated.
Last update: 2025-10-14 07:18:07 UTC
README
CLI to compile SASS files using scssphp Library.
I created this library to compile a project's SASS files from a deployment pipeline.
Usage
Create a script in the project's composer.json:
"scripts": {
"compile-sass": "sass2css assets/src/sass/ assets/dist/css/",
}
From the pipeline run:
composer run-script compile-sass
Options
--formatter=value
sass2css assets/src/sass/ assets/dist/css/ --formatter=nested
By default all output files will be formatted with SCSSPHP's Crunched formatter but we can specify any of the other available options:
- compact = Leafo\ScssPhp\Formatter\Compact
- compressed = Leafo\ScssPhp\Formatter\Compressed
- crunched = Leafo\ScssPhp\Formatter\Crunched (default)
- expanded = Leafo\ScssPhp\Formatter\Expanded
- nested = Leafo\ScssPhp\Formatter\Nested
--suffix=value
Add a .min suffix to all output files, so styles.sass becomes styles.min.sass:
sass2css assets/src/sass/ assets/dist/css/ --suffix=.min
--verbose
List processed files.
sass2css assets/src/sass/ assets/dist/css/ --verbose