LegacyResult
Hierarchy
- LegacyResult
Properties
css
The compiled CSS. This can be converted to a string by calling Buffer.toString.
Example
const result = sass.renderSync({file: "style.scss"});
console.log(result.css.toString());
Optional map
The source map that maps the compiled CSS to the source files from which it was generated. This can be converted to a string by calling Buffer.toString.
This is undefined unless either
The source map uses absolute file:
URLs to link to the Sass
source files, except if the source file comes from data in which case it lists its URL as "stdin".
Example
const result = sass.renderSync({
  file: "style.scss",
  sourceMap: true,
  outFile: "style.css"
})
console.log(result.map.toString());
stats
duration: number;
end: number;
entry: string;
includedFiles: string[];
start: number;
}
Additional information about the compilation.
Type declaration
- 
duration: numberThe number of milliseconds it took to compile the Sass file. This is always equal to startminusend.
- 
end: numberThe number of milliseconds between 1 January 1970 at 00:00:00 UTC and the time at which Sass compilation ended. 
- 
entry: string
- 
includedFiles: string[] An array of the absolute paths of all Sass files loaded during compilation. If a stylesheet was loaded from a LegacyImporter that returned the stylesheet’s contents, the raw string of the @useor@importthat loaded that stylesheet included in this array.
- 
start: numberThe number of milliseconds between 1 January 1970 at 00:00:00 UTC and the time at which Sass compilation began. 
The object returned by render and renderSync after a successful compilation.
Deprecated
This is only used by the legacy render and renderSync APIs. Use compile, compileString, compileAsync, and compileStringAsync instead.