-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
add update-contributors script; closes #3289 #3290
Conversation
scripts/update-contributors.js
Outdated
.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase())); | ||
const newCount = contributors.length; | ||
const pkgFilepath = path.join(ROOT, 'package.json'); | ||
const pkg = JSON.parse(fs.readFileSync(pkgFilepath, 'utf8')); |
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.
How about you just do require(pkgFilepath);
?
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.
In this case, it’s mainly semantic. If I don’t need nor want the caching which require()
provides, then I shouldn’t use it. In this script it doesn’t really matter since we don’t use the result elsewhere, but I feel it better illustrates the intent.
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 understood what you mean. :)
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.
LGTM 🚀
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
* add update-contributors script; closes mochajs#3289 * attempt to fix cache issue with npm@2.x Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
This updates the
contributors
prop ofpackage.json
and adds tooling to help.This grabs information from Git only. I am working on a better way to ensure more people are recognized, but this is what I have for now. On the plus side, it's very fast.
We lose the GitHub user URLs, but not a big deal IMO.