-
Notifications
You must be signed in to change notification settings - Fork 487
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
fix(@clayui/css): Use prettier to format Clay CSS #3069
Conversation
b894636
to
9a7250f
Compare
Pull Request Test Coverage Report for Build 4698
💛 - Coveralls |
.prettierignore
Outdated
.codesandbox | ||
.git | ||
.github | ||
.storybook |
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.
How come all of these got added? I think we should still include all of these except for the .git folder.
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.
I didn't realize these were configurations we added. I assumed these were autogenerated similar to .cache
on clayui.com
.prettierignore
Outdated
packages/clay-css/src/scss/bootstrap/**/**/**/*.scss | ||
packages/clay-css/**/**/**/**/**/*.js | ||
packages/clay-css/**/**/**/**/**/*.md | ||
packages/clay-css/**/**/**/**/**/*.json |
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.
Also are we able to format the js md and json in clay? Or are those ignored for a specific reason?
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.
The test site uses several third-party js plugins. I didn't want to ignore them separately since the test site isn't a critical part of the Clay repo. For example, we shouldn't be formatting svg4everybody.js
, clay-css/src/js/site/jquery.ba-outside-events.min.js
, sassdoc-theme-clay-css/dist/index.js
, sassdoc-theme-clay-css/dist/nunjucks.js
, etc.
If it's something you want I can add it. I was thinking along the lines of why process files that don't really matter?
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.
You don't need all those repeated **
— one is equivalent to any number of intervening directories (full syntax described here).
For example:
packages/clay-css/**/*.js
is the same aspackages/clay-css/**/**/**/**/**/*.js
If you really want to say "match exactly 5 levels down" you would use a single *
at each level:
packages/clay-css/*/*/*/*/*/*.js
If you want to ignore dist-like third-party stuff like the stuff you list you can either list it explicitly:
/packages/clay-css/dist
/packages/clay-css/src/js/site/jquery.*
# etc
or ignore everything then whitelist specific stuff:
/packages/clay-css/**/*.js
!packages/clay-css/specific/place/to/whitelist/**/*.js
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.
Thanks @wincent, I'll make these changes and push it up.
@bryceosterhaus I removed |
@pat270 the js,json,md in clay-css should be fine, just wanted to verify. And the reason its not formatting |
That's right. Given patterns like these:
Any
And if we want to ignore
|
@bryceosterhaus @wincent here is the updated |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 7d65ec6:
|
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.
Looks good to me!
…st site related files issue liferay#2037
Formatted clayui.com and clay-charts scss files fixes liferay#2037
Fixed conflicts. |
@bryceosterhaus sounds good. Merging. |
fixes #2037
@bryceosterhaus I updated
.prettierignore
to exclude files related to the test site, Bootstrap source, and_global-functions.scss
.