Skip to content

Commit 63098c7

Browse files
committed
Update for full list of contributors ❤️
1 parent 248a84c commit 63098c7

File tree

8 files changed

+92
-18
lines changed

8 files changed

+92
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
build/*.json
3+
!build/contributors.json
34
data/*.md
45
npm-debug.log

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ clean:
1010
disc:
1111
browserify src/index.js src/splash.js --full-paths | uglifyjs -c | discify --open
1212

13-
start: relink build/examples.json
13+
start: relink build/examples.json build/contributors.json
1414
wzrd src/index.js:build/bundle.min.js \
1515
src/splash.js:build/splash.min.js
1616

@@ -24,7 +24,7 @@ postinstall: relink
2424
build/:
2525
mkdir build
2626

27-
build/bundle.min.js: build/ build/examples.json
27+
build/bundle.min.js: build/ build/examples.json build/contributors.json
2828
browserify src/index.js | uglifyjs -c > build/bundle.min.js
2929

3030
build/splash.min.js: build/ build/examples.json
@@ -33,5 +33,8 @@ build/splash.min.js: build/ build/examples.json
3333
build/examples.json: build/ data/examples.md
3434
node data/regenerate
3535

36+
build/contributors.json: build/
37+
node data/contributors
38+
3639
data/examples.md: build/
3740
node data/sync

build/contributors.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"name":"hughsk","image":"https://avatars.githubusercontent.com/u/569817?v=3","count":113},{"name":"mattdesl","image":"https://avatars.githubusercontent.com/u/1383811?v=3","count":87},{"name":"mikolalysenko","image":"https://avatars.githubusercontent.com/u/231686?v=3","count":79},{"name":"thibauts","image":"https://avatars.githubusercontent.com/u/2544184?v=3","count":14},{"name":"mikkoh","image":"https://avatars.githubusercontent.com/u/496903?v=3","count":10},{"name":"chrisdickinson","image":"https://avatars.githubusercontent.com/u/37303?v=3","count":8},{"name":"wwwtyro","image":"https://avatars.githubusercontent.com/u/929443?v=3","count":8},{"name":"yoshuawuyts","image":"https://avatars.githubusercontent.com/u/2467194?v=3","count":8},{"name":"shama","image":"https://avatars.githubusercontent.com/u/99604?v=3","count":6},{"name":"TatumCreative","image":"https://avatars.githubusercontent.com/u/1588648?v=3","count":5},{"name":"tmpvar","image":"https://avatars.githubusercontent.com/u/46673?v=3","count":5},{"name":"deathcap","image":"https://avatars.githubusercontent.com/u/5897956?v=3","count":5},{"name":"timoxley","image":"https://avatars.githubusercontent.com/u/43438?v=3","count":4},{"name":"marklundin","image":"https://avatars.githubusercontent.com/u/430764?v=3","count":3},{"name":"substack","image":"https://avatars.githubusercontent.com/u/12631?v=3","count":3},{"name":"maxogden","image":"https://avatars.githubusercontent.com/u/39759?v=3","count":2},{"name":"abiro","image":"https://avatars.githubusercontent.com/u/5764438?v=3","count":2},{"name":"Hypercubed","image":"https://avatars.githubusercontent.com/u/509946?v=3","count":2},{"name":"bsergean","image":"https://avatars.githubusercontent.com/u/11857745?v=3","count":2},{"name":"mreinstein","image":"https://avatars.githubusercontent.com/u/718067?v=3","count":2},{"name":"dy-dx","image":"https://avatars.githubusercontent.com/u/1074881?v=3","count":2},{"name":"nickdesaulniers","image":"https://avatars.githubusercontent.com/u/1823839?v=3","count":2},{"name":"ranweiler","image":"https://avatars.githubusercontent.com/u/515835?v=3","count":2},{"name":"twolfson","image":"https://avatars.githubusercontent.com/u/902488?v=3","count":2},{"name":"danez","image":"https://avatars.githubusercontent.com/u/231804?v=3","count":2},{"name":"sidorares","image":"https://avatars.githubusercontent.com/u/173025?v=3","count":2},{"name":"razh","image":"https://avatars.githubusercontent.com/u/240770?v=3","count":2},{"name":"msfeldstein","image":"https://avatars.githubusercontent.com/u/161135?v=3","count":2},{"name":"jakepruitt","image":"https://avatars.githubusercontent.com/u/5084263?v=3","count":1},{"name":"geek","image":"https://avatars.githubusercontent.com/u/441346?v=3","count":1},{"name":"rasteiner","image":"https://avatars.githubusercontent.com/u/6684137?v=3","count":1},{"name":"micha149","image":"https://avatars.githubusercontent.com/u/298880?v=3","count":1},{"name":"hamoid","image":"https://avatars.githubusercontent.com/u/108264?v=3","count":1},{"name":"rezaali","image":"https://avatars.githubusercontent.com/u/555207?v=3","count":1},{"name":"jb55","image":"https://avatars.githubusercontent.com/u/45598?v=3","count":1},{"name":"davebrent","image":"https://avatars.githubusercontent.com/u/1835547?v=3","count":1},{"name":"dannyfritz","image":"https://avatars.githubusercontent.com/u/315788?v=3","count":1},{"name":"mdtusz","image":"https://avatars.githubusercontent.com/u/6494463?v=3","count":1},{"name":"mikeseven","image":"https://avatars.githubusercontent.com/u/809004?v=3","count":1},{"name":"lmeyerov","image":"https://avatars.githubusercontent.com/u/4249447?v=3","count":1},{"name":"creationix","image":"https://avatars.githubusercontent.com/u/89353?v=3","count":1},{"name":"pastasfuture","image":"https://avatars.githubusercontent.com/u/2949353?v=3","count":1},{"name":"ralphtheninja","image":"https://avatars.githubusercontent.com/u/308049?v=3","count":1},{"name":"timknip2","image":"https://avatars.githubusercontent.com/u/138757?v=3","count":1},{"name":"tmcw","image":"https://avatars.githubusercontent.com/u/32314?v=3","count":1},{"name":"tschundler","image":"https://avatars.githubusercontent.com/u/1110025?v=3","count":1},{"name":"Gloridea","image":"https://avatars.githubusercontent.com/u/322413?v=3","count":1},{"name":"joekarl","image":"https://avatars.githubusercontent.com/u/150038?v=3","count":1},{"name":"Maratyszcza","image":"https://avatars.githubusercontent.com/u/1093985?v=3","count":1},{"name":"nicholasbishop","image":"https://avatars.githubusercontent.com/u/1023208?v=3","count":1},{"name":"ansis","image":"https://avatars.githubusercontent.com/u/1421652?v=3","count":1},{"name":"abacon","image":"https://avatars.githubusercontent.com/u/903181?v=3","count":1},{"name":"robert-chiniquy","image":"https://avatars.githubusercontent.com/u/623808?v=3","count":1},{"name":"twilson63","image":"https://avatars.githubusercontent.com/u/21292?v=3","count":1},{"name":"mafintosh","image":"https://avatars.githubusercontent.com/u/376661?v=3","count":1},{"name":"TehShrike","image":"https://avatars.githubusercontent.com/u/1141869?v=3","count":1},{"name":"emilbayes","image":"https://avatars.githubusercontent.com/u/416524?v=3","count":1},{"name":"zeke","image":"https://avatars.githubusercontent.com/u/2289?v=3","count":1},{"name":"cvan","image":"https://avatars.githubusercontent.com/u/203725?v=3","count":1},{"name":"wooorm","image":"https://avatars.githubusercontent.com/u/944406?v=3","count":1},{"name":"RGBboy","image":"https://avatars.githubusercontent.com/u/1566539?v=3","count":1},{"name":"scothis","image":"https://avatars.githubusercontent.com/u/302992?v=3","count":1},{"name":"acerix","image":"https://avatars.githubusercontent.com/u/379534?v=3","count":1},{"name":"jenanwise","image":"https://avatars.githubusercontent.com/u/21303?v=3","count":1},{"name":"coballast","image":"https://avatars.githubusercontent.com/u/1788893?v=3","count":1},{"name":"mrspeaker","image":"https://avatars.githubusercontent.com/u/129330?v=3","count":1},{"name":"jwerle","image":"https://avatars.githubusercontent.com/u/1462973?v=3","count":1},{"name":"sfrdmn","image":"https://avatars.githubusercontent.com/u/590570?v=3","count":1},{"name":"drspaniel","image":"https://avatars.githubusercontent.com/u/1588273?v=3","count":1},{"name":"breedx2","image":"https://avatars.githubusercontent.com/u/1888255?v=3","count":1},{"name":"59naga","image":"https://avatars.githubusercontent.com/u/1548478?v=3","count":1},{"name":"hapticdata","image":"https://avatars.githubusercontent.com/u/330356?v=3","count":1},{"name":"Barryrowe","image":"https://avatars.githubusercontent.com/u/1013426?v=3","count":1},{"name":"arthurvr","image":"https://avatars.githubusercontent.com/u/6025224?v=3","count":1},{"name":"billautomata","image":"https://avatars.githubusercontent.com/u/432483?v=3","count":1},{"name":"lchenay","image":"https://avatars.githubusercontent.com/u/804687?v=3","count":1},{"name":"lukeapage","image":"https://avatars.githubusercontent.com/u/309321?v=3","count":1},{"name":"mauricedb","image":"https://avatars.githubusercontent.com/u/3197730?v=3","count":1},{"name":"noffle","image":"https://avatars.githubusercontent.com/u/489362?v=3","count":1},{"name":"vorg","image":"https://avatars.githubusercontent.com/u/171001?v=3","count":1},{"name":"kumavis","image":"https://avatars.githubusercontent.com/u/1474978?v=3","count":1},{"name":"liamgriffiths","image":"https://avatars.githubusercontent.com/u/179645?v=3","count":1},{"name":"alexanderGugel","image":"https://avatars.githubusercontent.com/u/703628?v=3","count":1},{"name":"olivierrr","image":"https://avatars.githubusercontent.com/u/8010834?v=3","count":1},{"name":"kemitchell","image":"https://avatars.githubusercontent.com/u/205760?v=3","count":1},{"name":"pdehaan","image":"https://avatars.githubusercontent.com/u/557895?v=3","count":1},{"name":"maurizzzio","image":"https://avatars.githubusercontent.com/u/1616682?v=3","count":1},{"name":"mdda","image":"https://avatars.githubusercontent.com/u/362532?v=3","count":1},{"name":"wblankenship","image":"https://avatars.githubusercontent.com/u/1081565?v=3","count":1},{"name":"doug","image":"https://avatars.githubusercontent.com/u/3379?v=3","count":1},{"name":"etpinard","image":"https://avatars.githubusercontent.com/u/6675409?v=3","count":1},{"name":"gre","image":"https://avatars.githubusercontent.com/u/211411?v=3","count":1},{"name":"kenrussell","image":"https://avatars.githubusercontent.com/u/1149904?v=3","count":1},{"name":"greggman","image":"https://avatars.githubusercontent.com/u/234804?v=3","count":1},{"name":"toji","image":"https://avatars.githubusercontent.com/u/805273?v=3","count":1},{"name":"Oletus","image":"https://avatars.githubusercontent.com/u/453050?v=3","count":1},{"name":"grorg","image":"https://avatars.githubusercontent.com/u/47596?v=3","count":1},{"name":"zhenyao","image":"https://avatars.githubusercontent.com/u/2073521?v=3","count":1},{"name":"pyalot","image":"https://avatars.githubusercontent.com/u/592826?v=3","count":1},{"name":"jdashg","image":"https://avatars.githubusercontent.com/u/1471629?v=3","count":1},{"name":"dsheets","image":"https://avatars.githubusercontent.com/u/59918?v=3","count":1},{"name":"TiborsHub","image":"https://avatars.githubusercontent.com/u/2655184?v=3","count":1},{"name":"RafaelCintron","image":"https://avatars.githubusercontent.com/u/8486520?v=3","count":1},{"name":"jareiko","image":"https://avatars.githubusercontent.com/u/764352?v=3","count":1},{"name":"jamiemadill","image":"https://avatars.githubusercontent.com/u/5702513?v=3","count":1},{"name":"andrewvarga","image":"https://avatars.githubusercontent.com/u/911440?v=3","count":1},{"name":"JunJiang","image":"https://avatars.githubusercontent.com/u/2585737?v=3","count":1},{"name":"nayankk","image":"https://avatars.githubusercontent.com/u/1480682?v=3","count":1},{"name":"mvujovic","image":"https://avatars.githubusercontent.com/u/1356052?v=3","count":1},{"name":"bjacob","image":"https://avatars.githubusercontent.com/u/79535?v=3","count":1},{"name":"apatrick-google","image":"https://avatars.githubusercontent.com/u/2199431?v=3","count":1},{"name":"dslomov","image":"https://avatars.githubusercontent.com/u/5008223?v=3","count":1},{"name":"c0d1f1ed","image":"https://avatars.githubusercontent.com/u/1659707?v=3","count":1},{"name":"gregcouch","image":"https://avatars.githubusercontent.com/u/6979917?v=3","count":1},{"name":"jbauman2","image":"https://avatars.githubusercontent.com/u/716431?v=3","count":1},{"name":"imzet","image":"https://avatars.githubusercontent.com/u/6390033?v=3","count":1},{"name":"janharaldfredriksen","image":"https://avatars.githubusercontent.com/u/3064393?v=3","count":1},{"name":"djg","image":"https://avatars.githubusercontent.com/u/156077?v=3","count":1},{"name":"vonture","image":"https://avatars.githubusercontent.com/u/3650582?v=3","count":1},{"name":"jdarpinian","image":"https://avatars.githubusercontent.com/u/454184?v=3","count":1},{"name":"wbinnssmith","image":"https://avatars.githubusercontent.com/u/755844?v=3","count":1}]

data/contributors.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const request = require('request')
2+
const path = require('path')
3+
const fs = require('fs')
4+
5+
const dest = path.join(__dirname, '..', 'build', 'contributors.json')
6+
7+
contributors(function (err, list) {
8+
if (err) throw err
9+
fs.writeFileSync(dest, JSON.stringify(list))
10+
})
11+
12+
function contributors (done) {
13+
request('http://stack.gl/packages/index.json', {
14+
json: true
15+
}, function (err, res, body) {
16+
if (err) return done(err)
17+
18+
const repos = Object.keys(body.repos).reduce(function (repos, category) {
19+
return repos.concat(body.repos[category])
20+
}, [])
21+
22+
const contributors = body.contributors
23+
24+
repos.forEach(function (repo) {
25+
repo.contrib.forEach(function (idx) {
26+
contributors[idx].count = contributors[idx].count || 0
27+
contributors[idx].count++
28+
})
29+
})
30+
31+
done(null, contributors.sort(function (a, b) {
32+
return b.count - a.count
33+
}))
34+
})
35+
}

index.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,3 +280,33 @@ h2 {
280280
[data-fill] {
281281
height: 100vh;
282282
}
283+
284+
#contributor-list {
285+
list-style-type: none;
286+
line-height: 40px;
287+
margin: 0;
288+
margin-left: -4px;
289+
margin-top: 1rem;
290+
}
291+
292+
#contributor-list li,
293+
#contributor-list li > a {
294+
display: block;
295+
float: left;
296+
line-height: 40px;
297+
height: 40px;
298+
}
299+
300+
#contributor-list li {
301+
padding: 4px;
302+
}
303+
304+
#contributor-list li > a {
305+
border-bottom: 0;
306+
border-radius: 40px;
307+
background-size: 40px 40px;
308+
background-size: cover;
309+
background-position: 50% 50%;
310+
width: 40px;
311+
height: 40px;
312+
}

index.html

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,9 @@ <h2>community</h2>
101101
<a target="_blank" href="http://github.com/stackgl/contributing/issues">stackgl/contributing's issue queue</a>.
102102
</p>
103103
<p>
104-
stackgl is only possible thanks to the excellent work of our contributors:
104+
stackgl is only possible thanks to the excellent work of dozens of contributors: thank you!
105105
</p>
106-
<ul>
107-
<li><a target="_blank" href="http://twitter.com/mikolalysenko">Mikola Lysenko</a></li>
108-
<li><a target="_blank" href="http://twitter.com/hughskennedy">Hugh Kennedy</a></li>
109-
<li><a target="_blank" href="http://twitter.com/isntitvacant">Chris Dickinson</a></li>
110-
<li><a target="_blank" href="http://twitter.com/mattdesl">Matt DesLauriers</a></li>
111-
<li><a target="_blank" href="http://twitter.com/thibautseguy">Thibaut Séguy</a></li>
112-
<li><a target="_blank" href="http://twitter.com/substack">James Halliday</a></li>
113-
<li><a target="_blank" href="http://twitter.com/aerinonfire">Aaron Davis</a></li>
114-
<li><a target="_blank" href="http://twitter.com/benp0st">Ben Postlethwait</a></li>
115-
<li><a target="_blank" href="http://twitter.com/tmpvar">Elijah Insua</a></li>
116-
<li><a target="_blank" href="http://twitter.com/maxogden">Max Ogden</a></li>
117-
</ul>
106+
<ul class="cf" id="contributor-list"></ul>
118107
</section>
119108
</main>
120109
<canvas id="grid"></canvas>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"start": "make start",
3333
"clean": "make clean",
3434
"postinstall": "make postinstall",
35-
"prepublish": "make build/bundle.min.js build/splash.min.js"
35+
"prepublish": "make build/bundle.min.js build/splash.min.js build/contributors.json"
3636
},
3737
"repository": {
3838
"type": "git",

src/index.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,24 @@ var examples = require('../build/examples.json').map(function(meta) {
1515
return thumb(meta)
1616
}).join('\n')
1717

18-
console.log(examples)
19-
2018
document
2119
.getElementById('examples')
2220
.querySelector('ul.thumbs')
2321
.appendChild(domify(examples))
22+
23+
var contribs = require('../build/contributors.json')
24+
var upper = Math.ceil(contribs.length * 0.1)
25+
26+
contribs = []
27+
.concat(contribs.slice(0, upper).sort(shuffle))
28+
.concat(contribs.slice(upper).sort(shuffle))
29+
.map(function (d) {
30+
return '<li class="contributor"><a title="' + d.name + '" href="https://github.com/' + d.name + '" style="background-image:url(\'' + d.image + '\')"></a></li>'
31+
}).join('')
32+
33+
document.getElementById('contributor-list')
34+
.appendChild(domify(contribs))
35+
36+
function shuffle () {
37+
return Math.random() - 0.5
38+
}

0 commit comments

Comments
 (0)