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

feat(options): allow users to pass their own cleanCss Options #377

Merged
merged 1 commit into from
Nov 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/cleancss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -72,5 +72,6 @@ export interface CleanCssConfig {
sourceFileName: string;
// sourceSourceMapName: string;
destFileName: string;
// destSourceMapName: string;
// options: cleanCss Options;
options?: cleanCss.Options;
}