@@ -15,6 +15,8 @@ import { runVersionCheck } from './run-version-check'
1515import { Template } from './template'
1616import { PackageManager } from './vendor/package-manager'
1717
18+ const minimalTemplateName = 'gill-next-tailwind-minimal'
19+
1820export async function getArgs ( argv : string [ ] , app : AppInfo , pm : PackageManager = 'npm' ) : Promise < GetArgsResult > {
1921 // Get the result from the command line
2022 const input = program
@@ -30,6 +32,7 @@ export async function getArgs(argv: string[], app: AppInfo, pm: PackageManager =
3032 . option ( '--list-template-ids' , help ( 'List available template ids as JSON array' ) )
3133 . option ( '--list-templates' , help ( 'List available templates' ) )
3234 . option ( '--list-versions' , help ( 'Verify your versions of Anchor, AVM, Rust, and Solana' ) )
35+ . option ( '--minimal' , help ( `Select the minimal template (${ minimalTemplateName } )` ) , false )
3336 . option ( '--skip-git' , help ( 'Skip git initialization' ) )
3437 . option ( '--skip-init' , help ( 'Skip running the init script' ) )
3538 . option ( '--skip-install' , help ( 'Skip installing dependencies' ) )
@@ -102,6 +105,14 @@ Examples:
102105
103106 let template : Template | undefined
104107
108+ if ( result . template && result . minimal ) {
109+ throw new Error ( `The --minimal flag can't be used in combination with --template. Please specify only one.` )
110+ }
111+
112+ if ( result . minimal ) {
113+ result . template = minimalTemplateName
114+ }
115+
105116 if ( result . template ) {
106117 template = findTemplate ( { name : result . template , templates, verbose } )
107118 }
0 commit comments