Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Update README with latest sponsors/team data #11378

Merged
merged 3 commits into from Feb 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
222 changes: 66 additions & 156 deletions README.md
Expand Up @@ -197,170 +197,80 @@ These folks keep the project moving and are resources for help.

The people who manage releases, review feature requests, and meet regularly to ensure ESLint is properly maintained.

<table>
<tbody>
<tr>
<td align="center" valign="top" width="11%">
<a href="https://github.com/nzakas">
<img src="https://github.com/nzakas.png?s=75" width="75px" height="75px"><br/>
<sub>Nicholas C. Zakas</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/ilyavolodin">
<img src="https://github.com/ilyavolodin.png?s=75" width="75px" height="75px"><br/>
<sub>Ilya Volodin</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/btmills">
<img src="https://github.com/btmills.png?s=75" width="75px" height="75px"><br/>
<sub>Brandon Mills</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/gyandeeps">
<img src="https://github.com/gyandeeps.png?s=75" width="75px" height="75px"><br/>
<sub>Gyandeep Singh</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/mysticatea">
<img src="https://github.com/mysticatea.png?s=75" width="75px" height="75px"><br/>
<sub>Toru Nagashima</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/alberto">
<img src="https://github.com/alberto.png?s=75" width="75px" height="75px"><br/>
<sub>Alberto Rodríguez</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/kaicataldo">
<img src="https://github.com/kaicataldo.png?s=75" width="75px" height="75px"><br/>
<sub>Kai Cataldo</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/not-an-aardvark">
<img src="https://github.com/not-an-aardvark.png?s=75" width="75px" height="75px"><br/>
<sub>Teddy Katz</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/platinumazure">
<img src="https://github.com/platinumazure.png?s=75" width="75px" height="75px"><br/>
<sub>Kevin Partington</sub></a>
</td>
</tr>
</tbody>
</table>
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--tscstart-->
<table><tbody><tr><td align="center" valign="top" width="11%">
<a href="https://github.com/nzakas">
<img src="https://github.com/nzakas.png?s=75" width="75" height="75"><br />
Nicholas C. Zakas
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/platinumazure">
<img src="https://github.com/platinumazure.png?s=75" width="75" height="75"><br />
Kevin Partington
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/ilyavolodin">
<img src="https://github.com/ilyavolodin.png?s=75" width="75" height="75"><br />
Ilya Volodin
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/btmills">
<img src="https://github.com/btmills.png?s=75" width="75" height="75"><br />
Brandon Mills
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/mysticatea">
<img src="https://github.com/mysticatea.png?s=75" width="75" height="75"><br />
Toru Nagashima
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/gyandeeps">
<img src="https://github.com/gyandeeps.png?s=75" width="75" height="75"><br />
Gyandeep Singh
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/kaicataldo">
<img src="https://github.com/kaicataldo.png?s=75" width="75" height="75"><br />
Kai Cataldo
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/not-an-aardvark">
<img src="https://github.com/not-an-aardvark.png?s=75" width="75" height="75"><br />
Teddy Katz
</a>
</td></tr></tbody></table><!--tscend-->

### Committers

The people who review and fix bugs and help triage issues.

<table>
<tbody>
<tr>
<td align="center" valign="top" width="11%">
<a href="https://github.com/Aladdin-ADD">
<img src="https://github.com/Aladdin-ADD.png?s=75" width="75px" height="75px"><br/>
<sub>薛定谔的猫</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/g-plane">
<img src="https://github.com/g-plane.png?s=75" width="75px" height="75px"><br/>
<sub>Pig Fang</sub></a>
</td>
</tr>
</tbody>
</table>


### Alumni

Former TSC members and committers who previously helped maintain ESLint.

<table>
<tbody>
<tr>
<td align="center" valign="top" width="11%">
<a href="https://github.com/lo1tuma">
<img src="https://github.com/lo1tuma.png?s=75" width="75px" height="75px"><br/>
<sub>Mathias Schreck</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/xjamundx">
<img src="https://github.com/xjamundx.png?s=75" width="75px" height="75px"><br/>
<sub>Jamund Ferguson</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/ianvs">
<img src="https://github.com/ianvs.png?s=75" width="75px" height="75px"><br/>
<sub>Ian VanSchooten</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/byk">
<img src="https://github.com/byk.png?s=75" width="75px" height="75px"><br/>
<sub>Burak Yiğit Kaya</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/michaelficarra">
<img src="https://github.com/michaelficarra.png?s=75" width="75px" height="75px"><br/>
<sub>Michael Ficarra</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/pedrottimark">
<img src="https://github.com/pedrottimark.png?s=75" width="75px" height="75px"><br/>
<sub>Mark Pedrotti</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/markelog">
<img src="https://github.com/markelog.png?s=75" width="75px" height="75px"><br/>
<sub>Oleg Gaidarenko</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/mikesherov">
<img src="https://github.com/mikesherov.png?s=75" width="75px" height="75px"><br/>
<sub>Mike Sherov</sub></a>
</td>
</tr>
<tr>
<td align="center" valign="top" width="11%">
<a href="https://github.com/hzoo">
<img src="https://github.com/hzoo.png?s=75" width="75px" height="75px"><br/>
<sub>Henry Zhu</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/mdevils">
<img src="https://github.com/mdevils.png?s=75" width="75px" height="75px"><br/>
<sub>Marat Dulin</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/zxqfox">
<img src="https://github.com/zxqfox.png?s=75" width="75px" height="75px"><br/>
<sub>Alexej Yaroshevich</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/vitorbal">
<img src="https://github.com/vitorbal.png?s=75" width="75px" height="75px"><br/>
<sub>Vitor Balocco</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/JamesHenry">
<img src="https://github.com/JamesHenry.png?s=75" width="75px" height="75px"><br/>
<sub>James Henry</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/soda0289">
<img src="https://github.com/soda0289.png?s=75" width="75px" height="75px"><br/>
<sub>Reyad Attiyat</sub></a>
</td>
<td align="center" valign="top" width="11%">
<a href="https://github.com/VictorHom">
<img src="https://github.com/VictorHom.png?s=75" width="75px" height="75px"><br/>
<sub>Victor Hom</sub></a>
</td>
</tr>
</tbody>
</table>
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--committersstart-->
<table><tbody><tr><td align="center" valign="top" width="11%">
<a href="https://github.com/aladdin-add">
<img src="https://github.com/aladdin-add.png?s=75" width="75" height="75"><br />
薛定谔的猫
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/g-plane">
<img src="https://github.com/g-plane.png?s=75" width="75" height="75"><br />
Pig Fang
</a>
</td></tr></tbody></table><!--committersend-->

## Sponsors

The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://opencollective.com/eslint) to get your logo on our README and website.

<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
<h3>Gold Sponsors</h3>
<p><a href="https://code.facebook.com/projects/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Fres.cloudinary.com%2Fopencollective%2Fimage%2Fupload%2Fv1508519428%2FS9gk78AS_400x400_fulq2l.jpg&height=96" alt="Facebook Open Source" height="96"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/proxy/images/?src=https%3A%2F%2Fopencollective-production.s3-us-west-1.amazonaws.com%2F098e3bd0-4d57-11e8-9324-0f6cc1f92bf1.png&height=96" alt="Airbnb" height="96"></a></p>
<!--sponsorsend-->

## Technology Sponsors

* Site search ([eslint.org](https://eslint.org)) is sponsored by [Algolia](https://www.algolia.com)


Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -82,6 +82,7 @@
"browserify": "^16.2.2",
"chai": "^4.0.1",
"cheerio": "^0.22.0",
"common-tags": "^1.8.0",
"coveralls": "^3.0.1",
"dateformat": "^3.0.3",
"ejs": "^2.6.1",
Expand Down
96 changes: 96 additions & 0 deletions tools/update-readme.js
@@ -0,0 +1,96 @@
/**
* @fileoverview Script to update the README with team and sponsors.
* Note that this requires eslint.github.io to be available in the same
* directory as the eslint repo.
*
* node tools/update-readme.js
*
* @author Nicholas C. Zakas
*/
"use strict";

//-----------------------------------------------------------------------------
// Requirements
//-----------------------------------------------------------------------------

const path = require("path");
const fs = require("fs");
const { stripIndents } = require("common-tags");

//-----------------------------------------------------------------------------
// Data
//-----------------------------------------------------------------------------

const README_FILE_PATH = path.resolve(__dirname, "../README.md");
const WEBSITE_DATA_PATH = path.resolve(__dirname, "../../eslint.github.io/_data");

const team = JSON.parse(fs.readFileSync(path.join(WEBSITE_DATA_PATH, "team.json")));
const allSponsors = JSON.parse(fs.readFileSync(path.join(WEBSITE_DATA_PATH, "sponsors.json")));
const readme = fs.readFileSync(README_FILE_PATH, "utf8");

const heights = {
gold: 96,
silver: 64,
bronze: 32
};

// remove backers from sponsors list - not shown on readme
delete allSponsors.backers;


//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------

/**
* Formats an array of team members for inclusion in the readme.
* @param {Array} members The array of members to format.
* @param {string} label The label for the section of the readme.
* @returns {string} The HTML for the members list.
*/
function formatTeamMembers(members, label) {
/* eslint-disable indent*/
return stripIndents`<!--${label}start-->
<table><tbody><tr>${
members.map((member, index) => `<td align="center" valign="top" width="11%">
<a href="https://github.com/${member.username}">
<img src="https://github.com/${member.username}.png?s=75" width="75" height="75"><br />
${member.name}
</a>
</td>${(index + 1) % 9 === 0 ? "</tr><tr>" : ""}`).join("")
}</tr></tbody></table><!--${label}end-->`;
/* eslint-enable indent*/
}

/**
* Formats an array of sponsors into HTML for the readme.
* @param {Array} sponsors The array of sponsors.
* @returns {string} The HTML for the readme.
*/
function formatSponsors(sponsors) {
const nonEmptySponsors = Object.keys(sponsors).filter(tier => sponsors[tier].length > 0);

/* eslint-disable indent*/
return stripIndents`<!--sponsorsstart-->
${
nonEmptySponsors.map(tier => `<h3>${tier[0].toUpperCase()}${tier.slice(1)} Sponsors</h3>
<p>${
sponsors[tier].map(sponsor => `<a href="${sponsor.url}"><img src="${sponsor.image}" alt="${sponsor.name}" height="${heights[tier]}"></a>`).join(" ")
}</p>`).join("")
}
<!--sponsorsend-->`;
/* eslint-enable indent*/
}

//-----------------------------------------------------------------------------
// Main
//-----------------------------------------------------------------------------

// replace all of the section
let newReadme = readme.replace(/<!--tscstart-->[\w\W]*?<!--tscend-->/, formatTeamMembers(team.tsc, "tsc"));

newReadme = newReadme.replace(/<!--committersstart-->[\w\W]*?<!--committersend-->/, formatTeamMembers(team.committers, "committers"));
newReadme = newReadme.replace(/<!--sponsorsstart-->[\w\W]*?<!--sponsorsend-->/, formatSponsors(allSponsors));

// output to the file
fs.writeFileSync(README_FILE_PATH, newReadme, "utf8");