@@ -38,6 +38,7 @@ export const initOptionsSchema = z.object({
3838 silent : z . boolean ( ) ,
3939 isNewProject : z . boolean ( ) ,
4040 srcDir : z . boolean ( ) . optional ( ) ,
41+ cssVariables : z . boolean ( ) ,
4142} )
4243
4344export const init = new Command ( )
@@ -61,6 +62,12 @@ export const init = new Command()
6162 "use the src directory when creating a new project." ,
6263 false
6364 )
65+ . option (
66+ "--no-src-dir" ,
67+ "do not use the src directory when creating a new project."
68+ )
69+ . option ( "--css-variables" , "use css variables for theming." , true )
70+ . option ( "--no-css-variables" , "do not use css variables for theming." )
6471 . action ( async ( components , opts ) => {
6572 try {
6673 const options = initOptionsSchema . parse ( {
@@ -318,21 +325,11 @@ async function promptForMinimalConfig(
318325 value : color . name ,
319326 } ) ) ,
320327 } ,
321- {
322- type : "toggle" ,
323- name : "tailwindCssVariables" ,
324- message : `Would you like to use ${ highlighter . info (
325- "CSS variables"
326- ) } for theming?`,
327- initial : defaultConfig ?. tailwind . cssVariables ,
328- active : "yes" ,
329- inactive : "no" ,
330- } ,
331328 ] )
332329
333330 style = options . style ?? "new-york"
334331 baseColor = options . tailwindBaseColor
335- cssVariables = options . tailwindCssVariables
332+ cssVariables = opts . cssVariables
336333 }
337334
338335 return rawConfigSchema . parse ( {
0 commit comments