• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 10 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🍴 A linter for your repository.

forkability

![Gitter](https://badges.gitter.im/Join Chat.svg) This is a forkable respository

Forkability helps you to make your project more open-source-friendly by pointing out missing features and useful tips.

How to use

Web App

https://basicallydan.github.io/forkability runs the code in its client-side form (works just fine). It allows you to log in using GitHub OAuth in order to get a higher API request quota.

Node Module/Command Line

npm install forkability -g

This will give you access to the forkability CLI. This is how you use it:

forkability basicallydan/forkability

Or whatever your username/repo combo is. It'll work with any public repo. If you start getting angry messages that you've used up your GitHub request quota, use the --username and --password flags, like so:

forkability jashkenas/backbone --username myusername --password totallynotmypasswordloldonttryitplz
# Basic auth!

This will give you a pretty, colourful (if your terminal supports it), UTF-8-tastic (if your terminal supports it) list of features and suggested features, as well as a pretty badge you can include in your README or repo's web page. It looks a bit like this:

forkability basicallydan/interfake

# Forkability found 6 recommended features, and has 2 suggestions

# Features (6)
✓ Contributing document
✓ Readme document
✓ License document
✓ .gitignore file
✓ Test suite
✓ Tags are being used

---

# Suggestions (2)
! Changelog document
! Uncommented issue: Comment on the issue to indicate acknowledgement
└── Media Responses: https://github.com/basicallydan/interfake/issues/19

---

# Forkability Badge (failure)
## Just the SVG: 
https://img.shields.io/badge/forkable-no-red.svg
## Markdown: 
[![This repository's forkability could be improved](https://img.shields.io/badge/forkable-no-red.svg)](https://basicallydan.github.io/forkability/?u=basicallydan&r=interfake)
## HTML: 
<a href="https://basicallydan.github.io/forkability/?u=basicallydan&r=interfake"><img alt="This repository's forkability could be improved" src="https://img.shields.io/badge/forkable-no-red.svg"></a>

Other Options

  • --reporter (-r): Specify how the lint report should be output (list (default), json or prettyjson)
  • --lang (-l): Specify languages to use for extra features to test. Comma-separated list. (available languages)
  • --help (-h): How to use the module, and will list available languages

JavaScript API

If you're really, really into this jazz you can use the JS API. This is how it looks:

forkability(options, function(err, report) {
	console.log('# Recommended files'.magenta);
	report.passes.forEach(function(thing) {
		console.log('✓'.green, thing);
	});
	report.failures.forEach(function(thing) {
		console.log('✘'.red, thing);
	});
});

options accepts:

  • user: The username of the repo owner (can be an organisation)
  • repository: The name of the repository
  • fileDepth: How deep to go into the file tree of the repo to check for files. (thanks @M-Zuber!)
  • auth: An object which can contain these thingies:
    • username: The username to authenticate with, using basic auth.
    • password: The password to authenticate with, using basic auth. Needs to be supplied with username.
    • token: If you're using OAuth or something, put the authentication token here. Check out pages/pages.js to see this badassery in action!

Thankfully, that's it.

Badges

Thanks to the generosity of shields.io there is in fact a Forkability badge for your repo. It will be generated in all three APIs, but I'd recommend using the web app for quickest access to the badge code.

A note of caution: Although you can easily fake it, it'd be very much against the spirit of Forkability if you either used the pass badge when your repo currently isn't passing, or if you didn't link to the Forkability report. So: please don't do that 😄

Contributing

Clone the repo using git clone [email protected]:basicallydan/forkability.git or HTTPS if you'd prefer. Once it's downloaded, you can use make deps to install dependencies. Use make help to see other makefile commands available such as test, serve and compile which are all useful for developing and testing new features.

The default make task will do the job of resolving dependencies, then testing the code, then compiling the code for the browser.

For more info on contributing to Forkability including guidelines, see contributing.md.

A key consideration when making contributions is to consider what makes a project forkable; there are many ways to look at a project and thus probably many opinions.

With this in mind we'd like to invite anybody reading this to open an issue, and/or make a pull request - pull requests are all the hotness right now - which details in some way what could be done to make this a more useful tool.

Contributors

Thanks to everybody who has helped. So far this includes:

Long-term goals of this project

  • Give people a recognisable score for the open-source-friendliness ("forkability") of their project
  • Inform people about the open-source movement
  • Educate people on the benefits of open-sourcing their code
  • Tell people about how they can improve the "forkability" of their project

Tests

Clone this repo, run npm install, then npm test.

Possible domains for this project:

  • forkability.org
  • forkability.io

Disclaimer

You should not use forkability as the sole way to judge how forkable your project is. After all, it is not in any way intelligent, it is merely looking for the presence of certain features in your project in order to nudge you in the right direction.

Your best bet to make your project as forkable as possible is to ask your friends, or your friendly neighbourhood open-source community!

Bitdeli Badge

More Repositories

1

interfake

💻 Fake APIs for prototypes & automated tests.
JavaScript
805
star
2

skifree.js

🎿 The classic PC Game SkiFree, but in JS.
JavaScript
507
star
3

q-examples

🎓 Examples of how to use kriskowal's "Q".
JavaScript
21
star
4

eventedloop

➰ Evented loops for timed events & games.
JavaScript
20
star
5

dothething

Do The Thing is an easy-to-configure server for handling webhooks.
Python
7
star
6

bomberman-mmo

💣 Incomplete online Bomberman clone.
JavaScript
4
star
7

giveafork

A little app to help you find open-source projects to contribute to
4
star
8

gpterm

A natural-language interface for your 🐚 shell, powered by GPT 🤖
Ruby
4
star
9

nodejs-for-front-end-workshop

Learn NodeJS as a Front-end developer.
CSS
3
star
10

danhough.com

My personal blog, written for generation by Jekyll
HTML
3
star
11

Onda

📰 Online News Diversity Analyser in Python
Python
3
star
12

BlankCanvas

A simple, no-bloat, no-framework, unopinionated boilerplate for creating a 2D Canvas Game from scratch
CSS
3
star
13

phonegap-not-so-bad-talk

The slide deck for a talk which I delivered at Mobilise London June 2014
2
star
14

elevator-lift

This is an elevator/lift simulator built in JavaScript. Maybe one day it will form part of a SimTower port?
JavaScript
2
star
15

Scroutenise

A simple Javascript library built on top of the Google Maps V3 + Places API to find places along a route
JavaScript
2
star
16

node-maintainer-talk

A talk titled "I'm a Node Module Maintainer (And So Can You!)"
HTML
2
star
17

gogive

A Battlehack London project. GoGive is a directory of high-street charitable organisations looking for donations.
JavaScript
2
star
18

mojirecall

How many Emoji can you recall from memory?
JavaScript
1
star
19

todos-phonegap

A crappy todo app for PhoneGap
Java
1
star
20

picnic

Collaborative project with Incubus London (https://incubuslondon.com). Name pending.
JavaScript
1
star
21

wen

Triggers events based on the truthiness of predicate methods
JavaScript
1
star
22

geo-path-compare

A small library for comparing two paths of latitude/longitude points
JavaScript
1
star
23

ruby-site-mapper

A script which takes a page and then goes through all the pages it can find on the domain of that page.
Ruby
1
star
24

simplemd.js

A really simple, unfinished markdown parser I wrote for a job interview once. Supports Headers, Paragraphs and Links.
JavaScript
1
star
25

jerk-for-git

In Britain, 'git' means something insulting, which always makes explaining the technology to people for the first time a tedious experience.
Batchfile
1
star