Skip to content
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: Support theming and translations via config files #260

Merged
merged 48 commits into from Mar 23, 2024

Conversation

phated
Copy link
Member

@phated phated commented Mar 17, 2024

This implements theming and translation support via the .gulp.js config files. If a user supplies a message function in their config file, we will call it with various message symbols and extra data. The user can return the message they want to print, return false explicitly to silence the message, or do nothing to fallback to the gulp-cli default message.

Since anything logged via gulplog will pass through this mechanism, users can also intercept string messages from plugins and return something different.

Users can also override the timestamp we print by providing a timestamp function in their config file.

Closes #63
Closes #177
Closes #206
Closes #161 (replaces it)

messages.js Outdated
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will become the new module so users can install it for usage in their .gulp.js files.

@phated phated requested a review from sttk March 18, 2024 04:13
@phated phated marked this pull request as ready for review March 18, 2024 04:13
@phated
Copy link
Member Author

phated commented Mar 18, 2024

@sttk this is ready for review. Please take a look! I've updated the top comment to describe the feature and updated tests, etc. Thank you for all of the amazing work that I used for the basis of these changes 🙇 ❤️

When we finalize this, I will put together the @gulpjs/messages package and update all of the TODOs.

@sttk
Copy link
Contributor

sttk commented Mar 18, 2024

@phated I have replied to your comments. Have a look them.

@phated
Copy link
Member Author

phated commented Mar 21, 2024

@sttk please review again now that I've addressed all your comments.

@phated
Copy link
Member Author

phated commented Mar 22, 2024

@sttk I've address the comments and added documentation. Can you provide a final review so I can make the @gulpjs/messages package and finish this PR in the next 3 days? 🙏

@sttk
Copy link
Contributor

sttk commented Mar 22, 2024

@phated I have added this comment, so please take a look. Otherwise, I think everything is good.

@phated
Copy link
Member Author

phated commented Mar 23, 2024

@sttk Thank you for the thorough review! I am going to create the @gulpjs/messages package and then update this PR to use it before merging.

@phated phated merged commit e16d675 into master Mar 23, 2024
18 checks passed
@phated phated deleted the phated/translations branch March 23, 2024 04:04
@phated phated added this to In progress in v5 via automation Mar 23, 2024
@phated phated moved this from In progress to Done in v5 Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v5
  
Done
2 participants