Adds manifest.json to examples folder (#3536)

* Revert "Revert "[examples] Add manifest.json""

This reverts commit c65336e63b.

* Revert "Revert "Do not use now-examples anymore""

This reverts commit ac72e944a7.

* Update nowignore

* Fix join

* Fix JSON

* Fix header

* Replace manifest.json with @now/frameworks

* Adjust readmes

* Adjust .nowignore

* Update scully

* Fix description

* Update examples/create-react-app/src/App.js

Co-Authored-By: Shu Ding <ds303077135@gmail.com>

* Update readme

* Add websites

* Use https

* Adjust example URL

* Change order

Co-authored-by: Shu Ding <ds303077135@gmail.com>
This commit is contained in:
Andy
2020-01-10 00:14:51 +01:00
committed by GitHub
parent 7064f4ee40
commit 2db627b79d
91 changed files with 9364 additions and 561 deletions

View File

@@ -10,9 +10,9 @@ export async function getGitHubRepoInfo(repo: Repo) {
const response = await fetch(`https://api.github.com/repos/${repo.repo}`, {
headers: {
Accept: 'application/vnd.github.machine-man-preview+json',
// If we don't use a personal access token,
// If we don't use a personal access token,
// it will get rate limited very easily.
Authorization: `Bearer ${process.env.GITHUB_ACCESS_TOKEN}`
Authorization: `Bearer ${process.env.GITHUB_ACCESS_TOKEN}`,
},
});
@@ -51,7 +51,9 @@ export async function getGitHubRepoInfo(repo: Repo) {
data.subdir = repo.path.slice(subdirPath.length).split('/');
}
if (data.id === 'zeit/now-examples' && data.subdir) {
const isExamples = data.id === 'zeit/now-examples' || data.id === 'zeit/now';
if (isExamples && data.subdir) {
// from our examples, add `homepage` and `description` fields
const example = data.subdir[0];
const exampleList = await getExampleList();
@@ -61,7 +63,6 @@ export async function getGitHubRepoInfo(repo: Repo) {
data.homepage = item.demo;
data.description = item.description;
data.exampleName = item.example;
data.icon = item.icon;
data.tagline = item.tagline;
data.framework = item.framework;
return data;