Skip to content

Not work cleancss -O0 less.css #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cooliean opened this issue Jun 19, 2022 · 1 comment
Closed

Not work cleancss -O0 less.css #80

cooliean opened this issue Jun 19, 2022 · 1 comment

Comments

@cooliean
Copy link

cooliean commented Jun 19, 2022

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;
  }
@jakubpawlowicz
Copy link
Collaborator

Hey @cooliean, you are 100% right. Would you mind turning this change into a PR?

SuperStormer added a commit to SuperStormer/cf-search that referenced this issue Sep 19, 2022
SuperStormer added a commit to SuperStormer/clean-css-cli that referenced this issue Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants