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

react-github-contributions-component

v0.2.0

Published

React component that builds your contributions calendar per year

Downloads

14

Readme

:date: React Github Contributions Component :date:

NPM version Dependency version NPM Downloads

My first npm project. I noticed there aren't any builds like this so I decided I'll create one myself. This component builds up a calendar from the commits you made to github. Component's screenshot

Requirement

  • First you need to get your Github Access Token. If you don't know how to do that here is how:
    • log in to your github account, and go into settings tab
    • go toDeveloper settings, and then Personal access tokens
    • click on Generate new token and check only the following: Generating token
    • Generate token and copy the given token
  • Create .env file at the root of your project folder (make sure you have .env included in .gitignore), and paste the given personal access token:
REACT_APP_GITHUB_ACCESS_TOKEN="your access token goes here"

This is needed to get access to github's api. You might encounter issues like your app will be getting a 401 error. In this case you need to reset the token in your github profile and change it in your .env file accordingly.

Install

Start by installing react-github-contributions-component

npm install react-github-contributions-component

Usage

Import it...

import {GithubContribution} from 'react-github-contributions-component'

...and use it in one of your components.

<GithubContribution userName="<yourusername>" theme="<option>" />
import {GithubContribution} from 'react-github-contributions-component';

function App() {
  return (
    <div className="App">
        <GithubContribution userName="jakapresecnik" theme="dark" />
    </div>
  );
}

Options

Themes

Theme examples Select one of these options for different theme: `"light", "dark", "purpleDark", "jokerLight", "jokerDark"

Direction

If you want it to have a different direction use attribute vertical in component. You don't need to pass any value in as it tests if it is true or false.

Future versions

Like I said I just started building it, and it is still a bit rough, so expect to get updated. But for the future as a whole, this project will probably become depreciated, as I am from Slovenia and there are no Front end developer roles here, as well as having a class system that doesn't allow me to have a decant job only some shitty jobs where you die as soon as your shift is over .