source: node_modules/github-from-package/readme.markdown@ 81bc7da

finki-main main
Last change on this file since 81bc7da was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago

Initial commit

  • Property mode set to 100644
File size: 895 bytes
Line 
1# github-from-package
2
3return the github url from a package.json file
4
5[![build status](https://secure.travis-ci.org/substack/github-from-package.png)](http://travis-ci.org/substack/github-from-package)
6
7# example
8
9For the `./package.json` file:
10
11``` json
12{
13 "name": "beep-boop",
14 "version": "1.2.3",
15 "repository" : {
16 "type" : "git",
17 "url": "git@github.com:substack/beep-boop.git"
18 }
19}
20```
21
22``` js
23var github = require('github-from-package');
24var url = github(require('./package.json'));
25console.log(url);
26```
27
28```
29https://github.com/substack/beep-boop
30```
31
32# methods
33
34``` js
35var github = require('github-from-package')
36```
37
38## var url = github(pkg)
39
40Return the most likely github url from the package.json contents `pkg`. If no
41github url can be determined, return `undefined`.
42
43# install
44
45With [npm](https://npmjs.org) do:
46
47```
48npm install github-from-package
49```
50
51# license
52
53MIT
Note: See TracBrowser for help on using the repository browser.