From 6bca7c83a7e2d62015f45f873b0f69f11b4d902b Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 8 Jun 2021 08:10:56 -0700 Subject: redesign create-astro (#301) * redesign create astro * add changeset * Use npm start * Update the astro version * Adds the changeset Co-authored-by: Fred Schott Co-authored-by: Matthew Phillips --- packages/create-astro/src/components/Help.tsx | 81 --------------------------- 1 file changed, 81 deletions(-) delete mode 100644 packages/create-astro/src/components/Help.tsx (limited to 'packages/create-astro/src/components/Help.tsx') diff --git a/packages/create-astro/src/components/Help.tsx b/packages/create-astro/src/components/Help.tsx deleted file mode 100644 index ebbc0aa3c..000000000 --- a/packages/create-astro/src/components/Help.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import React, { FC } from 'react'; -import { Box, Text } from 'ink'; -import decamelize from 'decamelize'; -import { ARGS, ARG } from '../config'; - -const Type: FC<{ type: any; enum?: string[] }> = ({ type, enum: e }) => { - if (type === Boolean) { - return ( - <> - true - | - false - - ); - } - if (e?.length > 0) { - return ( - <> - {e.map((item, i, { length: len }) => { - if (i !== len - 1) { - return ( - - {item} - | - - ); - } - - return ( - - {item} - - ); - })} - - ); - } - - return string; -}; - -const Command: FC<{ name: string; info: ARG }> = ({ name, info: { alias, description, type, enum: e } }) => { - return ( - - - --{name} - {alias && -{alias}} - - - - - - {description} - - - ); -}; - -const Help: FC<{ context: any }> = ({ context: { templates } }) => { - return ( - <> - - - {' astro '} - - - - {' '} - help{' '} - - - - - {Object.entries(ARGS).map(([name, info]) => ( - value) } : info} /> - ))} - - - ); -}; -export default Help; -- cgit v1.2.3