format: prettify entire project
This commit is contained in:
4
node_modules/github-from-package/example/package.json
generated
vendored
4
node_modules/github-from-package/example/package.json
generated
vendored
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "beep-boop",
|
||||
"version": "1.2.3",
|
||||
"repository" : {
|
||||
"type" : "git",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:substack/beep-boop.git"
|
||||
}
|
||||
}
|
||||
|
25
node_modules/github-from-package/index.js
generated
vendored
25
node_modules/github-from-package/index.js
generated
vendored
@ -1,17 +1,16 @@
|
||||
module.exports = function (pkg) {
|
||||
var m;
|
||||
if (m = match(JSON.stringify(pkg.repository))) {
|
||||
return m;
|
||||
}
|
||||
else if (m = match(JSON.stringify(pkg))) {
|
||||
return m;
|
||||
}
|
||||
return undefined;
|
||||
var m;
|
||||
if ((m = match(JSON.stringify(pkg.repository)))) {
|
||||
return m;
|
||||
} else if ((m = match(JSON.stringify(pkg)))) {
|
||||
return m;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
function match (str) {
|
||||
var m = /\bgithub.com[:\/]([^\/"]+)\/([^\/"]+)/.exec(str);
|
||||
if (m) {
|
||||
return 'https://github.com/' + m[1] + '/' + m[2].replace(/\.git$/, '');
|
||||
}
|
||||
function match(str) {
|
||||
var m = /\bgithub.com[:\/]([^\/"]+)\/([^\/"]+)/.exec(str);
|
||||
if (m) {
|
||||
return 'https://github.com/' + m[1] + '/' + m[2].replace(/\.git$/, '');
|
||||
}
|
||||
}
|
||||
|
56
node_modules/github-from-package/package.json
generated
vendored
56
node_modules/github-from-package/package.json
generated
vendored
@ -1,30 +1,30 @@
|
||||
{
|
||||
"name" : "github-from-package",
|
||||
"version" : "0.0.0",
|
||||
"description" : "return the github url from a package.json file",
|
||||
"main" : "index.js",
|
||||
"devDependencies" : {
|
||||
"tap" : "~0.3.0",
|
||||
"tape" : "~0.1.5"
|
||||
},
|
||||
"scripts" : {
|
||||
"test" : "tap test/*.js"
|
||||
},
|
||||
"repository" : {
|
||||
"type" : "git",
|
||||
"url" : "git://github.com/substack/github-from-package.git"
|
||||
},
|
||||
"homepage" : "https://github.com/substack/github-from-package",
|
||||
"keywords" : [
|
||||
"github",
|
||||
"package.json",
|
||||
"npm",
|
||||
"repository"
|
||||
],
|
||||
"author" : {
|
||||
"name" : "James Halliday",
|
||||
"email" : "mail@substack.net",
|
||||
"url" : "http://substack.net"
|
||||
},
|
||||
"license" : "MIT"
|
||||
"name": "github-from-package",
|
||||
"version": "0.0.0",
|
||||
"description": "return the github url from a package.json file",
|
||||
"main": "index.js",
|
||||
"devDependencies": {
|
||||
"tap": "~0.3.0",
|
||||
"tape": "~0.1.5"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/substack/github-from-package.git"
|
||||
},
|
||||
"homepage": "https://github.com/substack/github-from-package",
|
||||
"keywords": [
|
||||
"github",
|
||||
"package.json",
|
||||
"npm",
|
||||
"repository"
|
||||
],
|
||||
"author": {
|
||||
"name": "James Halliday",
|
||||
"email": "mail@substack.net",
|
||||
"url": "http://substack.net"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
Reference in New Issue
Block a user