-
Notifications
You must be signed in to change notification settings - Fork 0
Add easterEggUtil with generateHappy() function (fix color CSS bug) #75
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
base: main
Are you sure you want to change the base?
Conversation
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Co-authored-by: klmhyeonwoo <[email protected]>
export function generateHappy(message?: string) {
const defaultMessages = [
"Keep going — you're doing great! 💪",
"Small steps lead to big changes. 🌱",
"Today is a good day to smile. 😊",
"You're closer than you think. 🌈",
"Stay curious, stay kind. ✨",
"Progress, not perfection. 🚀",
"You make the code better. 💻❤️",
"Breathe. You’re doing your best. 🌤️",
"Trust the process, enjoy the journey. 🛤️",
"Every bug fixed is a victory. 🐞🏆",
];
const text =
message ??
defaultMessages[Math.floor(Math.random() * defaultMessages.length)];
const timestamp = new Date().toLocaleTimeString();
console.log(
`%c[${timestamp}] %c${text}`,
'color: #ff69b4; font-weight: bold;',
'color: #333; font-size: 14px;'
);
return text;
}Good! |
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.
Pull Request Overview
This PR adds a new generateHappy() utility function to display encouraging messages to developers in the console and fixes a CSS color bug where team-layer/kr-corekit#333 (likely from a GitHub reference copy/paste) is corrected to the proper hex color value #333.
Key changes:
- New
easterEggUtil/generateHappy()function with 10 default motivational messages and optional custom message support - Fixed malformed CSS color value from GitHub reference to proper hex color
#333 - Added complete test coverage with 6 test cases
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package/easterEggUtil/generateHappy/index.ts | Implements the main function with styled console output and corrected CSS color value |
| package/easterEggUtil/generateHappy/index.test.ts | Comprehensive test suite covering default/custom messages, console output, and styling |
| package/easterEggUtil/index.ts | Module export for the new utility |
| package/index.ts | Added easterEggUtil to main package exports |
| package.json | Added easterEggUtil to package exports configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot Please Add README.md for genereateHappy() util function |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: klmhyeonwoo <[email protected]>
Added comprehensive README documentation for generateHappy():
Commit: 4506372 |
Implements
generateHappy()function to display encouraging developer messages in the console. The issue code contained a malformed CSS color valueteam-layer/kr-corekit#333(likely from a GitHub reference copy/paste) that should be#333.Changes
New utility:
package/easterEggUtil/generateHappy/team-layer/kr-corekit#333→#333Exports: Added easterEggUtil to package exports (package.json, package/index.ts)
Tests: 6 test cases covering default/custom messages, console output formatting, and styling parameters
Documentation: Comprehensive README documentation
package/easterEggUtil/generateHappy/with usage examples, API details, and feature descriptionsUsage
Console output:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.