npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

auto-authors

v0.1.5

Published

Command line tool for generating a list of authors from git commit history and github

Downloads

14

Readme

auto-authors

Command line tool for generating a list of authors from git commit history and github.

Created in the spirit of auto-changelog.

GitHub license Build Status npm Project Status

Installation

$ npm install auto-authors

# or globally, if you like

$ npm install -g auto-authors

Usage

NOTE: You may need to provide your github access token to get past API limits, see below.

$ auto-authors 

This will create a AUTHORS.md file with all authors of a given repo, in the order of contribution, using the compact template.

Options

auto-authors can also take some argument, which you can use to control its output. You can use --help to see this list as well.

options | default | description ------- | ------- | ----------- template | compact | The template to use, either one of the provided tempates (compact, complete, or json) or the path to a custom template. output | AUTHORS.md | The file to write the author info to.

Optional Authentication

To get around GitHub's API rate limiting you can provide a personal OAuth2 access token, e.g.

$ OAUTH_TOKEN=b2935592ba8667b668d4a433162bc3d2b96e9e1b auto-authors

You can create and revoke personal access tokens in your account settings. For this use case no special permissions are required, so public access is sufficient.

Automatic authors generation

Running the script as part of the npm publishing workflow can automatically update the authors list. The simplest way to do this is via the version npm script.

"scripts": {
  "version": "auto-authors && git add AUTHORS.md"
}

Now when you use npm version to increment your package's version, the updated authors file will be committed with the version commit. Adjust that command as needed based on your desired template and output file.

Programmatic Usage

If you'd like to use this module in node, it exports 3 methods, all of which return promises:

method | description ------ | ----------- githubAuthors() | Resolves to an array of objects for each author. The objects contain name, email, and username depending on what information is available, and uses the Github API to get the username. gitAuthors() | Resolves to an array of objects for each author. The objects contain name and email and does not use the Github API at all. compileTemplate(template, data) | Resolves to a string, containing the markdown output given the template and data. data should be an object with an authors property that contains an array of authors (from githubAuthors or gitAuthors).

License

MIT © David Trejo, Joe Fleming