-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
feat: activate the content section of tailwind.config.js #256
Conversation
Package Version ReportThe following packages have been updated: |
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, I think this is a good change.
It should be mentioned in the documentation though that now if you define a custom tailwind config you have to set the content option. Please add this to both the jaspr_tailwind readme and the docs/eco/tailwind docs.
@schultek As you mentioned, the document has been updated. However, since I am not from an English-speaking country, there is a possibility that there may be awkwardness in the sentences, so I would appreciate it if you could review it. Thank you. |
var assets = await buildStep.findAssets(Glob('{lib,web}/**.dart')).toList(); | ||
await Future.wait(assets.map((a) => buildStep.canRead(a))); |
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.
When using a custom config with other content files, the tailwind command won't be rerun when those other files change. Do you think this is a problem?
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.
Well, it may be a bit cumbersome to use, but since the main files are dart files, I don't think it's a serious problem. If you were to modify this part, you would have to read the config js file and extract the content part in dart. Is it possible to implement this?
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 think its ok for now, but a welcome improvement for a future PR if you want. So I'm going to merge this now and also add a hint that this isn't watching any additional files added to content.
var assets = await buildStep.findAssets(Glob('{lib,web}/**.dart')).toList(); | ||
await Future.wait(assets.map((a) => buildStep.canRead(a))); |
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 think its ok for now, but a welcome improvement for a future PR if you want. So I'm going to merge this now and also add a hint that this isn't watching any additional files added to content.
Thanks again for your work on this, its really appreciated. |
Description
Currently, in
japr_tailwind
package, thecontent
section of thetailwind.config.js
file is completely ignored during the build process, and only the pre-specified dart file path is used for the build. However, in actual use, it may sometimes be necessary to additionally register other files ascontent
in addition to the dart file. Therefore, if there is notailwind.config.js
file, it automatically uses the pre-specified dart file path as now, but if there is a configuration file, I think it makes more sense to apply thecontent
section in the file. Therefore, I modified the code accordingly and suggest this.Type of Change
✨ New feature or improvement
Ready Checklist
the semantic_changelog format.
///
).