Skip to content
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

Compress option not doing anything #5

Open
travisdahl opened this issue Feb 3, 2014 · 11 comments
Open

Compress option not doing anything #5

travisdahl opened this issue Feb 3, 2014 · 11 comments
Labels

Comments

@travisdahl
Copy link

    bless: {
      css: {
        options: {
          compress: true,
          force: true,
          cleanup: true
        },
        files: {
          'css/stylesheets/dev/app.css': 'css/stylesheets/app.css'
        }
      }

The result is no different that when I don't compress it.

@AaronAsAChimp
Copy link
Member

Thanks for the bug, the compress option only compresses the css added by bless. This means that if bless doesn't need to split the file, it will remain unchanged. I'll update the documentation to make this more clear.

Can you verify that this is the case for you?

@travisdahl
Copy link
Author

It is, in fact splitting, but neither file is any different than when I dont use that option.

@AaronAsAChimp
Copy link
Member

It may not be different, the option simply disables adding whitespace after the import statement. After several tests, it appears to work as intended.

If you, or anyone, can provide a test case that proves it is not working as expected it would be huge help.

@travisdahl
Copy link
Author

Oh ok, sorry I misunderstood, I was expecting some kind of minification to happen. Remove comments, line breaks, whitespace.

@colinduwe
Copy link

I had the same misunderstanding. Does anyone have any recommendations for how best to minify the output? I can minify the first file with grunt-contrib-cssmin but it will still have the @import pointing to the unminified version(s) of the Bless output.

@AaronAsAChimp
Copy link
Member

You should minify the CSS first, then bless will point to the correct files.

@jpdevries
Copy link

I misunderstood this also

@bjorkblom
Copy link

If I minify the css first and then bless it the output will always be unminified.

@yannikmethot
Copy link
Contributor

+1, running grunt-bless on minified css always output unminified css...

@pixeldrew
Copy link

+1 I minify first and the output is then unminified.

@pixeldrew
Copy link

pixeldrew commented Jul 7, 2016

Looks like blessc since 4.0.0 is expanding minified CSS. This is very annoying as it looks like after you run cssmin on the "chunked" output, cssmin wants to process the imports (if you remove the process import statement it doesn't quite work either)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants