@tylertech/forge-build-tools
Version:
Node utilities for building and packaging libraries.
25 lines (24 loc) • 1.07 kB
TypeScript
import { type Options } from 'sass';
export interface SassCompileOptions {
minify?: boolean;
postCss?: boolean;
sassOptions?: Options<'sync'>;
}
/**
* Compiles .scss files to .css files within a `rootDir` and outputs them to the `outputDir`.
* @param {string[] | string} files An array of filenames, or a glob pattern to find files.
* @param {string} rootDir The common root directory in which the input files live. This is used to build the structure within the output directory.
* @param {string} outputDir The output directory where the .css files will be written to.
*/
export declare function compileSass(files: string[] | string, rootDir: string, outputDir: string, options?: SassCompileOptions): Promise<string[]>;
/**
* Runs CSS transformers on the provided CSS content.
* @param filename The CSS filename.
* @param css The CSS content.
*/
export declare function runPostCss(filename: string, css: string): Promise<string>;
/**
* Minifies CSS content.
* @param css The CSS content.
*/
export declare function minifyCss(css: string): string;