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
Skip CSS when creating APIs. #50907
Skip CSS when creating APIs. #50907
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.
My first instinct is that we shouldn't allow conflicting options to be specified, so I'm not sure if this should be accepted. However, in case someone else sees it differently I left a few comments on the implementation
Edit: and once my suggestions are addressed, you should squash your commits into one
@@ -309,6 +309,7 @@ class AppGenerator < AppBase | |||
api: [ | |||
:skip_asset_pipeline, | |||
:skip_javascript, | |||
:skip_css |
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.
There is currently no --skip-css
option, so I don't think this is doing anything
assert_no_file "app/views/layouts/applicaearion.html.erb" do |content| | ||
assert_no_match(/tailwind/, content) | ||
end |
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 filename here is misspelled. Additionally, since the expectation is that there is no file I don't think the block is ever run.
Update CHANGELOG. Address requested changes.
1951171
to
4ddf6cc
Compare
Thank you so much, @skipkayhil! The changes have been addressed. The edge case happens when |
@ruyrocha wouldn’t the |
I'm afraid they're separate issues, @bradleypriest |
I feel like if I wrote Isn't the only reason this came up in reality because it also involves the rc file? |
Got it. It started with rc file issue, and
|
Motivation / Background
This Pull Request has been created because Tailwind CSS was included when generating APIs.
Detail
This Pull Request changes the behavior of skipping CSS for APIs.
Additional information
It addresses part of #50900.
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]