forked from jonschlinkert/parse-github-url
-
Notifications
You must be signed in to change notification settings - Fork 0
/
support.js
53 lines (50 loc) · 1.82 KB
/
support.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
'use strict';
var util = require('util');
var gh = require('./');
var formats = [
'assemble/verb#1.2.3',
'assemble/verb#branch',
'assemble/verb',
'git+https://github.com/assemble/verb.git',
'git+ssh://github.com/assemble/verb.git',
'git://gh.pages.com/assemble/verb.git',
'git://github.assemble.com/assemble/verb.git',
'git://github.assemble.two.com/assemble/verb.git',
'git://github.com/assemble/verb',
'git://github.com/assemble/verb.git',
'[email protected]:assemble/verb.git',
'[email protected]:assemble/verb.git#1.2.3',
'[email protected]:assemble/verb.git#v1.2.3',
'[email protected]:assemble/verb.git',
'github:assemble/verb',
'http://github.com/assemble',
'http://github.com/assemble/verb',
'http://github.com/assemble/verb.git',
'http://github.com/assemble/verb/tree',
'http://github.com/assemble/verb/tree/master',
'http://github.com/assemble/verb/tree/master/foo/bar',
'https://assemble.github.com/assemble/verb/somefile.tar.gz',
'https://assemble.github.com/assemble/verb/somefile.zip',
'https://[email protected]/assemble/verb.git',
'https://gh.pages.com/assemble/verb.git',
'https://github.com/assemble/verb',
'https://github.com/assemble/verb.git',
'https://github.com/assemble/verb/blob/1.2.3/README.md',
'https://github.com/assemble/verb/blob/249b21a86400b38969cee3d5df6d2edf8813c137/README.md',
'https://github.com/assemble/verb/blob/master/assemble/index.js',
'https://github.com/assemble/verb/tree/1.2.3',
'https://github.com/assemble/verb/tree/feature/1.2.3',
'https://github.com/repos/assemble/verb/tarball',
'https://github.com/repos/assemble/verb/zipball',
];
module.exports = function() {
var res = '';
formats.forEach(function(url) {
res += '\n// '
+ url + '\n'
+ util.inspect(gh(url), null, 10)
+ '\n';
});
console.log(res);
return res;
};