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

fork-me-on-github

v1.0.6

Published

A fresher 'Fork me on GitHub' callout, now on React

Downloads

154

Readme

Fork me on GitHub

Fork me on GitHub

:octopus: A fresher 'Fork me on GitHub' callout, now on React.

MIT Licence

Use fork-me-on-github to promote your project on GitHub:

<ForkMeOnGithub repo="https://github.com/whatthefoo/fork-me-on-github"/>

...outputs a black SVG 'Fork me on GitHub' corner that's animated on hover. The default is black background with a white Octocat.

Customization

Instead of maintaining a list of possible combinations on this README, I created a living GitHub page, tha serves both as a way of showcase the variations and facilitate their use.

https://whatthefoo.github.io/fork-me-on-github/

On this page you can:

  • Choose your 'Fork me on GitHub' from a set of pre-defined ones
  • Copy the resulting component to the clipboard
  • See a demonstration of what can be customized

Properties

repo:

String, Required.

<ForkMeOnGithub repo="https://github.com/whatthefoo/fork-me-on-github"/>

colorOctocat:

String, Optional (defaults to white)

If the assigned color doesn't pass color validation (courtesy of validate-color), it will fallback to white. Check your console for messages if you don't see your change applied.

<ForkMeOnGithub
  repo="https://github.com/whatthefoo/fork-me-on-github"
  colorOctocat="#bada55"
/>

colorBackground:

If the assigned color doesn't pass color validation (courtesy of validate-color), it will fallback to black. Check your console for messages if you don't see your change applied.

String, Optional (defaults to black)

<ForkMeOnGithub
  repo="https://github.com/whatthefoo/fork-me-on-github"
  colorBackground="#bada55"
/>

isDocumentation:

Boolean, Optional (defaults to false)

If passed, it won't apply the absolute positioning, overriding the prop side.

<ForkMeOnGithub
  repo="https://github.com/whatthefoo/fork-me-on-github"
  isDocumentation
/>

side:

String, Optional (defaults to right, only accepts right or left)

If isDocumentation is passed, side will have no effect as the component won't be absolutely positioned.

<ForkMeOnGithub
  repo="https://github.com/whatthefoo/fork-me-on-github"
  side="left"
/>

text:

String, Optional (defaults to Fork me on GitHub)

This property is solely meant to improve accessibility.

<ForkMeOnGithub
  repo="https://github.com/whatthefoo/fork-me-on-github"
  text="View source on GitHub"
/>

Using fork-me-on-github through npm

fork-me-on-github is also available as a package on npm and can be installed as a depedency with:

npm i fork-me-on-github --save

As with any node module, first you'll have to import it with require:

var ForkMeOnGithub = require('fork-me-on-github');

...but in a modern React implementation you'll be using import:

import ForkMeOnGithub from 'fork-me-on-github';

Development

Getting started

Clone this repo locally. You'll need to have NodeJS installed. Install all dependencies by running:

npm i

Run it locally

To start the app locally, run:

npm run start

This command fires up the application on port 9990, making it visible on http://localhost:9990. Because this app is based on create-react-app, the port number should be configured on the .env file.

Building the frontend for Production

When you're ready to build for production, run:

 npm run build

This command compiles all production-optimised resources to a folder called build. It's meant to be run remotely, at the environment host, at build time.

License

MIT

About

fork-me-on-github was put together by Wallace Sidhrée 👨‍💻🇳🇴. It is heavily based on github-corners, an amazing work done by Tim Holman.