Files
vercel/api/_lib/examples/example-list.ts
Andy daa5cbdd4b [frameworks] Rename frameworks to now-frameworks (#3569)
* [frameworks] Rename frameworks to now-frameworks

* Adjust .nowignore
2020-01-10 19:13:27 +01:00

26 lines
607 B
TypeScript

import Frameworks, { Framework } from '../../../packages/now-frameworks';
interface Example {
example: string;
path: string;
demo: string;
description: string;
tagline: string;
framework: string;
}
export async function getExampleList(): Promise<Example[]> {
return (Frameworks as Framework[])
.filter(f => f.demo)
.map(framework => {
return {
example: framework.name,
path: `/${framework.slug}`,
demo: framework.demo,
description: framework.description,
tagline: framework.tagline,
framework: framework.slug,
};
});
}