-
Notifications
You must be signed in to change notification settings - Fork 122
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
Cleancss fix #509
Cleancss fix #509
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matteofigus I am not sure where this jstransformer-uglify-css
is applied as I can see only test related files; is this basically another jade compiler?
@@ -0,0 +1,3 @@ | |||
_package | |||
package.tar.gz | |||
node_modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -0,0 +1,5 @@ | |||
var sum = function(x, y){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is client-side js that runs through uglify, can't be ES6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kk
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@mattiaerre any time jade/pug encounters a filter, it tries to resolve the filter by requiring |
This is the code that the jade-legacy removed in favour of migrating to jstransformers, which basically broke the uglify-css filter: jnordberg/jade-legacy@0ec5fc6 |
@matteofigus this LGTM 👍 |
Thanks for your quick help @mattiaerre |
@matteofigus let me know if there is anything else I can do in order to help you w/ testing this new functionality once it will be released |
With the recent upgrade of oc-template-jade (#497) using a patched jade version with security fixes, the
uglify-css
filter has gone in favour of newestclean-css
. This means that components using this filter in production would break.This introduces support for the old filter, allowing a clean migration to the new filter (by publishing a new component that uses
clean-css
instead ofuglify-css
.In order to test it works, I added a component that has all the filters (jade-filters) which I test doesn't generate any compilation error during rendering.