Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 20df6d4

Browse files
alan-agius4danbucholtz
authored andcommitted
feat(options): allow users to pass their own cleanCss Options (#377)
1 parent 254bb6c commit 20df6d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cleancss.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function cleancssWorker(context: BuildContext, configFile: string): Promi
3333
Logger.debug(`cleancss read: ${srcFile}`);
3434

3535
readFileAsync(srcFile).then(fileContent => {
36-
const minifier = new cleanCss();
36+
const minifier = new cleanCss(cleanCssConfig.options);
3737
minifier.minify(fileContent, (err, minified) => {
3838
if (err) {
3939
reject(new BuildError(err));
@@ -72,5 +72,6 @@ export interface CleanCssConfig {
7272
sourceFileName: string;
7373
// sourceSourceMapName: string;
7474
destFileName: string;
75-
// destSourceMapName: string;
75+
// options: cleanCss Options;
76+
options?: cleanCss.Options;
7677
}

0 commit comments

Comments
 (0)