💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# C.85 SassTask The `SassTask` converts SCSS or Sass files to CSS using either the ['sass' gem](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#using_sass) or the [scssphp package](http://leafo.github.io/scssphp/). Table C.115:聽Attributes NameTypeDescriptionDefaultRequired`check``Boolean`Whether to just check the syntax of the input files.FalseNo`compact``Boolean`Set the style to compact.FalseNo`compressed``Boolean`Set the style to compressed.FalseNo`crunched``Boolean`Set the style to crunched. Supported by scssphp, not sass.FalseNo`expand``Boolean`Set the style to expanded.FalseNo`encoding``String`Default encoding for input files. Supported by scssphp.utf-8No`executable``String`Location/name of the sass executable, if required.sassNo`extfilter``String`Extension to filter against.n/aNo`failonerror``Boolean`Whether to fail/halt if an error occurs.`False`No`file``String`Name of single file to process.`N/A`No`flags``String`Additional flags to set for sass executable.n/aNo`input``String`Name of single file to process. Synonym for file.`N/A`No`keepsubdirectories``Boolean`Whether to keep the directory structure when compiling.TrueNo`linenumbers``Boolean`Whether to annotate generated CSS with source file and line numbers.FalseNo`nested``Boolean`Set the style to expanded.trueNo`newext``String`Extension for newly created files.cssNo`nocache``Boolean`Whether to cache parsed sass files.n/aNo`output``String`Corresponding output file for 'file'/'input' parameter. If not specified and outputpath is, then the generated file is placed there, with the filename based on the input file. If neither is specified, then the generated file is placed into the directory that the input file is in. `N/A`No`outputpath``String`Where to place the generated CSS files.n/aYes`path``String`Specify sass import path. e.g. --load-path ...n/aNo`removeoldext``Boolean`Whether to strip existing extension off the output filename.TrueNo`style``String`Name of style to output. Must be one of 'nested', 'compact', 'compressed', 'crunched' or 'expanded'. 'Helper' attributes may also be used. 'crunched' is supported by scssphp only.nestedNo`trace``Boolean`Whether to show a full stack trace on error.FalseNo`unixnewlines``Boolean`Use Unix-style newlines in written files.TrueNo`useSass``Boolean`Whether to use the 'sass' command line tool. Takes precedence over scssphp if both are available and enabled.TrueNo`useScssphp``Boolean`Whether to use the 'scssphp' PHP package.TrueNo The useSass and useScssphp attributes can be used to indicate which compiler should be used, which would be useful if both are available. If both are available and enabled, then the 'sass' compiler is used rather than the scssphp library. C.85.1 Example ``` <sass style="compact" trace="yes" unixnewlines="yes" outputpath="${compiled.dir.resolved}"> <fileset dir="."/> </sass> ``` C.85.2 Supported Nested Tags - `fileset`