Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

speculative readme

  • Loading branch information...
commit 4ed7efc6140bbdf935f393b68fb794940a40361c 0 parents
@substack authored
Showing with 51 additions and 0 deletions.
  1. +51 −0 readme.markdown
51 readme.markdown
@@ -0,0 +1,51 @@
+# github-from-package
+
+return the github url from a package.json file
+
+# example
+
+For the `./package.json` file:
+
+``` json
+{
+ "name": "beep-boop",
+ "version": "1.2.3",
+ "repository" : {
+ "type" : "git",
+ "url": "git@github.com:substack/beep-boop.git"
+ }
+}
+```
+
+``` js
+var github = require('github-from-package');
+var url = github(require('./package.json'));
+console.log(url);
+```
+
+```
+https://github.com/substack/beep-boop
+```
+
+# methods
+
+``` js
+var github = require('github-from-package')
+```
+
+## var url = github(pkg)
+
+Return the most likely github url from the package.json contents `pkg`. If no
+github url can be determined, return `undefined`.
+
+# install
+
+With [npm](https://npmjs.org) do:
+
+```
+npm install github-from-package
+```
+
+# license
+
+MIT
Please sign in to comment.
Something went wrong with that request. Please try again.