0.2.5 • Published 6 years ago

github-paths v0.2.5

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

github-paths 🗺

A tiny node module for getting URLs to github.

Installation

npm install --save github-paths

or with yarn

yarn add github-paths

Usage

Creating new issues:

const github = require("github-paths");

// https://github.com/flaque/blog/issues/new?title=my+title&body=my+body+text
const href = github("flaque/blog").issue("my title", "my body text");

Editing files:

const github = require("github-paths");

// https://github.com/flaque/github-paths/edit/master/index.js
const href = github("flaque/github-paths").edit("index.js");

Linking to source:

const github = require("github-paths");

// https://github.com/Flaque/boop/blob/master/boop.go
const href = github("flaque/boop").source("boop.go");

Why?

Github can be used in all sorts of ways that don't mesh with it's defined purpose.

For example, you can use github issues as a comment system if you'd like. Just put a URL in an href like this:

<a href="https://github.com/flaque/blog/issues/new">Make a comment</a>

But did you know that github also supports title and body query params?

Try clicking on this link:

https://github.com/flaque/blog/issues/new?title=plz+dont+submit&body=hi+there

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago