From d23e2b565cd9dd8f1b0455791be62cdb9791f13b Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Sat, 12 Nov 2016 09:56:09 +0100 Subject: [PATCH] feat(options): allow users to pass their own cleanCss Options --- src/cleancss.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cleancss.ts b/src/cleancss.ts index b73371ff..2d26acfe 100644 --- a/src/cleancss.ts +++ b/src/cleancss.ts @@ -33,7 +33,7 @@ export function cleancssWorker(context: BuildContext, configFile: string): Promi Logger.debug(`cleancss read: ${srcFile}`); readFileAsync(srcFile).then(fileContent => { - const minifier = new cleanCss(); + const minifier = new cleanCss(cleanCssConfig.options); minifier.minify(fileContent, (err, minified) => { if (err) { reject(new BuildError(err)); @@ -72,5 +72,6 @@ export interface CleanCssConfig { sourceFileName: string; // sourceSourceMapName: string; destFileName: string; - // destSourceMapName: string; + // options: cleanCss Options; + options?: cleanCss.Options; }