Skip to content

Conversation

@GordonSmith
Copy link

csso.justDoIt() method is deprecated, use csso.minify() instead

`csso.justDoIt()` method is deprecated, use `csso.minify()` instead
@mattslocum
Copy link

+1

@guybedford
Copy link
Owner

Would anyone be interested in taking over maintenance of this project? I'm happy to assign new contributors.

@alundiak
Copy link
Collaborator

alundiak commented Dec 1, 2016

@guybedford this PR was first before my PR (I was in a hurry, didn't see it exists).
Has someone agreed to maintain this project?

===

I have such error (based on requirecss 0.1.8 and csso 1.5.3 and even 1.8.1)

`csso.justDoIt()` method is deprecated, use `csso.minify()` instead
Compressed CSS output to 82%.

And according csso release info in csso 2.0.0 they dropped justDoIt() at all.

So this change is about to use csso.minify() and with further new 0.1.9 version of requirecss.

tested with local code in scope of my project - no error then.

Btw, I also tested with csso v 2.3.0, where initially I had and warning

[TypeError: csso.justDoIt is not a function]
Compression failed due to a CSS syntax error.

So after usage csso.minify() no warning.

===

cc/ @mattslocum @GordonSmith

@guybedford
Copy link
Owner

I'm happy to add new maintainers if anyone is interested.

@alundiak
Copy link
Collaborator

alundiak commented Feb 2, 2017

This PR, will be most probably closed in favor of #219
I'm doing local project setup and bug verification and testing new fix. Later I will merge changes.

@alundiak
Copy link
Collaborator

alundiak commented Feb 3, 2017

Ok, finally tested with csso 1.8.0, 2.0.0 and 2.3.1.
2.0.0 csso release is breaking-change release - deprecated function justDoIt() has been finally removed and replaced by minify() usage. So this code suggested will not work with all releases of csso.

The suggested code, gives error (in case of csso >= 2.0.0):

Compressed CSS output to NaN%.
{ 
[
 Error: TypeError: content.replace is not a function at escape (eval at <anonymous> 
(C:\IdeaProjects\.......\node_modules\grunt-contrib-requirejs\node_modules\requirejs\bin\r.js:25271:38), 
<anonymous>:93:20)
]
  originalError: [TypeError: content.replace is not a function] 
}

We have to use csso.minify().css, so this PR will be closed.

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 this pull request may close these issues.

4 participants