diff options
author | 2021-06-08 08:10:56 -0700 | |
---|---|---|
committer | 2021-06-08 11:10:56 -0400 | |
commit | 6bca7c83a7e2d62015f45f873b0f69f11b4d902b (patch) | |
tree | 5662630e51c6e6e743785d308785cff2e47568f0 /packages/create-astro/src/config.ts | |
parent | 9594447335b7fa15f82c0789f18a3fe02ec20d70 (diff) | |
download | astro-6bca7c83a7e2d62015f45f873b0f69f11b4d902b.tar.gz astro-6bca7c83a7e2d62015f45f873b0f69f11b4d902b.tar.zst astro-6bca7c83a7e2d62015f45f873b0f69f11b4d902b.zip |
redesign create-astro (#301)
* redesign create astro
* add changeset
* Use npm start
* Update the astro version
* Adds the changeset
Co-authored-by: Fred Schott <fks@Freds-MBP.attlocal.net>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Diffstat (limited to 'packages/create-astro/src/config.ts')
-rw-r--r-- | packages/create-astro/src/config.ts | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/packages/create-astro/src/config.ts b/packages/create-astro/src/config.ts deleted file mode 100644 index 8da0720e6..000000000 --- a/packages/create-astro/src/config.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type * as arg from 'arg'; -import decamelize from 'decamelize'; - -export interface ARG { - type: any; - description: string; - enum?: string[]; - alias?: string; -} - -export const ARGS: Record<string, ARG> = { - template: { - type: String, - description: 'specifies template to use', - }, - use: { - type: String, - enum: ['npm', 'yarn'], - description: 'specifies package manager to use', - }, - skipInstall: { - type: Boolean, - description: 'should installing dependencies be skipped?', - }, - force: { - type: Boolean, - alias: 'f', - description: 'should existing files be overwritten?', - }, - version: { - type: Boolean, - alias: 'v', - description: 'prints current version', - }, - help: { - type: Boolean, - alias: 'h', - description: 'prints this message', - }, -}; - -export const args = Object.entries(ARGS).reduce((acc, [name, info]) => { - const key = `--${decamelize(name, { separator: '-' })}`; - const spec = { ...acc, [key]: info.type }; - - if (info.alias) { - spec[`-${info.alias}`] = key; - } - return spec; -}, {} as arg.Spec); |