Revert "Do not use now-examples anymore"

This reverts commit fdb74b7971.
This commit is contained in:
Andy Bitz
2020-01-09 17:28:49 +01:00
parent fdb74b7971
commit ac72e944a7
2 changed files with 17 additions and 4 deletions

View File

@@ -20,8 +20,15 @@ export default withApiHandler(async function(
return res.send(exampleList);
}
await extract('https://github.com/zeit/now/archive/master.zip', '/tmp');
const exampleList = summary('/tmp/now-master/examples');
await Promise.all([
extract('https://github.com/zeit/now/archive/master.zip', '/tmp'),
extract('https://github.com/zeit/now-examples/archive/master.zip', '/tmp'),
]);
const exampleList = new Set([
...summary('/tmp/now-master/examples'),
...summary('/tmp/now-examples-master'),
]);
const existingExamples = Array.from(exampleList).map(key => ({
name: key,