-
Notifications
You must be signed in to change notification settings - Fork 33
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
Minification #35
Minification #35
Conversation
- fixtures are taken from babel plugin
- cases are in fixtures - snapshots are in baselines - use jest-specific-snapshot
- add `minify` option (default `false) - start minifying - still there're issues
src/__tests__/baselines/minification/minify-css-in-helpers.ts.baseline
Outdated
Show resolved
Hide resolved
styled.div \`bla (\`; | ||
// ignores even unescaped URLs | ||
// \`https://test.com\` | ||
styled.div \`https:\`; |
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.
doesn't work
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.
not sure it is needed... waiting more feedback
styled.div \`https:\`; | ||
// removes multi-line comments | ||
// \`this is a test\` | ||
styled.div \`this is atest\`; |
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.
spaceismissing
- emits unnecessery spaces in some cases
This adds experimental support of
minify
option.The test cases were mostly taken from Babel plugin and tried to align results.
A few discrepancies I found:
'
,"
,)
-- it seems css/scss works fine with it (likeurl(..)no-repeat
)Implements #14