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

@anchoredlabs/contrib

v0.1.0-beta.0

Published

Generate list of contributors from a git repo

Downloads

3

Readme

Contrib

A CLI tools to generate a CONTRIBUTORS file based on git commits to highlight the work of the contributors to the project

Install

With npm:

# global (to use as a CLI tool)
npm install --global @anchoredlabs/contrib

# to use programmatically
npm install -D @anchoredlabs/contrib

With yarn:

# global (to use as a CLI tool)
yarn global add @anchoredlabs/contrib

# to use programmatically
yarn add --dev @anchoredlabs/contrib

Usage

# from the project directory with default options
contrib

# to generate the list of contributors for a different directory, use the `cwd` flag
contrib --cwd path/to/another/directory

API

contrib(options?)

Creates a CONTRIBUTORS.md file in the current working directory

options

Type: object You can specify the below options.

cwd

cwd Current working directory of the script Default: current working directory

Type: string
Default: process.cwd()

Working directory to find .git directory.

contributors-file

Type: boolean
Default: true

Whether or not the generated contributors are added to the contributors file (file will be created if it does not exist)

package-file

Type: boolean
Default: false

Whether or not the generated contributors are added to the package.json file

sort, s

Type: string
Default: lastName

Sorts the output by the specified property

sort-order

Type: string
Choices: asc, desc
Default: asc

The sorting direction

merge, -m

Type: array

A simple way to merge names or emails. NOTE: Git's .mailmap functionality can be used to perform more complex merging

contrib --merge "original:new value" --merge "second:another value"
# or you can simply list the values (space separated)
contrib --merge "original:new value" "second:another value"
include-domains

Type: array

Only allows emails with the specified domains. Value is used similar to a string.includes() so example would match [email protected], but it would also match [email protected]. To account for this, the value is passed in to new RegExp() which allows you to more precisely match emails. You can pass example.com$ to match only emails from [email protected] and not [email protected].

exclude-domains

Type: array

Omits emails with the specified domains. This value is processed in the same manner as --include-domains.

contributors-file-name

Type: string
Default: CONTRIBUTORS.md

The file name for the contributors file.

contributors-file-message

Type: string
Default: Thank you to all the Contributors that have helped support this project.

A message that is added to the top of the contributors file.

contributors-directory-path

Type: string
Default: the value of the cwd options above.

The directory in which the contributors file should be created.

verbose, -v

Run with verbose logging, helpful when troubleshooting.

dry-run, --dry

Simulate the operation, with verbose logging

help

Show help

version

Show version number

License

Apache-2.0 © Anchored Labs