clean-css-cli
clean-css-cli copied to clipboard
Not work cleancss -O0 less.css
this is a bug
options = {
batch: inputOptions.batch,
compatibility: inputOptions.compatibility,
format: inputOptions.format,
inline: typeof inputOptions.inline == 'string' ? inputOptions.inline : 'local',
inlineTimeout: inputOptions.inlineTimeout * 1000,
level: { 1: true },
output: inputOptions.output,
rebase: inputOptions.withRebase ? true : false,
rebaseTo: undefined,
sourceMap: inputOptions.sourceMap,
sourceMapInlineSources: inputOptions.sourceMapInlineSources
};
if (program.rawArgs.indexOf('-O0') > -1) {
options.level[0] = true;
}
if (program.rawArgs.indexOf('-O1') > -1) {
options.level[1] = findArgumentTo('-O1', program.rawArgs, program.args);
}
if use level -O0 level: { 1: true }, options.level[1] is always true
if (program.rawArgs.indexOf('-O1') > -1) {
options.level[1] = findArgumentTo('-O1', program.rawArgs, program.args);
}else{
options.level[1] = false;
}
Hey @cooliean, you are 100% right. Would you mind turning this change into a PR?