RenderOptions
interface RenderOptions {
beautify?: boolean;
convertColor?: any;
cwd?: string;
expandNestingRules?: boolean;
indent?: string;
minify?: boolean;
newLine?: string;
output?: string;
preserveLicense?: boolean;
removeComments?: boolean;
removeEmpty?: boolean;
resolve?: (
url: string,
currentUrl: string,
currentWorkingDirectory?: string,
) => ResolvedPath;
sourcemap?: boolean | "inline";
withParents?: boolean;
}
beautify?: boolean;
convertColor?: any;
cwd?: string;
expandNestingRules?: boolean;
indent?: string;
minify?: boolean;
newLine?: string;
output?: string;
preserveLicense?: boolean;
removeComments?: boolean;
removeEmpty?: boolean;
resolve?: (
url: string,
currentUrl: string,
currentWorkingDirectory?: string,
) => ResolvedPath;
sourcemap?: boolean | "inline";
withParents?: boolean;
}
Hierarchy (View Summary)
- RenderOptions
Index
Properties
node.RenderOptions.beautifynode.RenderOptions.convertColornode.RenderOptions.cwdnode.RenderOptions.expandNestingRulesnode.RenderOptions.indentnode.RenderOptions.minifynode.RenderOptions.newLinenode.RenderOptions.outputnode.RenderOptions.preserveLicensenode.RenderOptions.removeCommentsnode.RenderOptions.removeEmptynode.RenderOptions.resolvenode.RenderOptions.sourcemapnode.RenderOptions.withParents
Properties
Optionalbeautify
beautify?: boolean
Pretty print css
const result = await transform(css, {beautify: true});
Optionalconvert Color
convertColor?: any
Convert color to the specified color space. 'true' will convert to HEX
Optional Internalcwd
cwd?: string
Current working directory
Optionalexpand Nesting Rules
expandNestingRules?: boolean
Expand nesting rules
Optionalindent
indent?: string
Indention string
Optionalminify
minify?: boolean
Minify css values.
Optionalnew Line
newLine?: string
New line string
Optional Internaloutput
output?: string
Output file. Used for url resolution
Optionalpreserve License
preserveLicense?: boolean
Preserve license comments. License comments are comments that start with '/*!'
Optionalremove Comments
removeComments?: boolean
Remove comments
Optionalremove Empty
removeEmpty?: boolean
Remove empty nodes. Empty nodes are removed by default
const css = `
@supports selector(:-ms-input-placeholder) {
:-ms-input-placeholder {
}
}`;
const result = await transform(css, {removeEmpty: false});
Optional Internalresolve
Resolve path
Optionalsourcemap
sourcemap?: boolean | "inline"
Generate sourcemap object. 'inline' will embed it in the css
Optionalwith Parents
withParents?: boolean
Render the node along with its parents
Ast node render options