-
-
Notifications
You must be signed in to change notification settings - Fork 849
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
tweak defining proto #95
Conversation
"resolve-from": "^1.0.0", | ||
"semver": "^4.3.3", | ||
"resolve-from": "^2.0.0", | ||
"semver": "^5.1.0", |
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.
Don't do unrelated changes. Bumping deps should be a separate PR.
The description field is there for a reason ;) Could you describe what you've changed and why? |
All this PR seems to do is to remove the function that generates the Chalk prototype in lieu of a simple object. There are reasons why we do this. Could you explain the decision behind changing this? |
The proposed implementation is simpler, and has less code.. so I'm all for 馃槈 @Qix- what's the reason? I suspect it's an artifact of refactor-fu back when trying to make the whole chained-call implementation performant, but perhaps I'm unaware of the slight difference between the current implementation's behaviour and that of the PR. All tests seem to pass though, and running the benchmark 10 times on both reveals no difference in performance. for i in {0..10}; do npm run bench; done | grep Elapsed on
on
|
return ret; | ||
} | ||
|
||
defineProps(Chalk.prototype, init()); |
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.
This is to just make the code simpler. and the logic is pretty much the same as generating the styles
above so I'm reusing it.
I'll make the changes tonight :) |
Any questions/problems with this PR? |
I'm busy at the moment, will try to review in a few days. @jbnicolai @Qix- Looks good to you? |
Yeah this looks fine. I misread what happened with the removal of the function. |
@stevemao Awesome! Thank you. I dig PRs that simplify the code :) |
No description provided.