This repository was archived by the owner on Jan 13, 2025. It is now read-only.
File tree 2 files changed +31
-10
lines changed
2 files changed +31
-10
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " create-akiradocs" ,
3
- "version" : " 1.0.47 " ,
3
+ "version" : " 1.0.48 " ,
4
4
"description" : " Create Akira Docs documentation sites with one command" ,
5
5
"main" : " ./dist/index.js" ,
6
6
"type" : " module" ,
Original file line number Diff line number Diff line change @@ -173,16 +173,37 @@ async function main() {
173
173
174
174
cli
175
175
. command ( '[directory]' , 'Create a new Akira Docs site' )
176
- . action ( async ( directory : string = '.' ) => {
176
+ . option ( '--yes' , 'Skip prompts and use default values' )
177
+ . action ( async ( directory : string = '.' , options : { yes ?: boolean } ) => {
177
178
try {
178
- const editorResponse = await enquirer . prompt < { includeEditor : boolean } > ( {
179
- type : 'confirm' ,
180
- name : 'includeEditor' ,
181
- message : 'Would you like to include the local editor? (Recommended for development)' ,
182
- initial : true ,
183
- } ) ;
184
-
185
- const configAnswers = await promptConfigQuestions ( ) ;
179
+ let editorResponse ;
180
+ let configAnswers ;
181
+
182
+ if ( options . yes ) {
183
+ // Use default values without prompting
184
+ editorResponse = { includeEditor : true } ;
185
+ configAnswers = {
186
+ siteTitle : 'My Documentation' ,
187
+ siteDescription : 'Documentation powered by Akira Docs' ,
188
+ companyName : 'My Company' ,
189
+ githubUrl : '' ,
190
+ twitterUrl : '' ,
191
+ linkedinUrl : '' ,
192
+ enableAnalytics : false ,
193
+ googleAnalyticsId : '' ,
194
+ enableAutoTranslate : false
195
+ } ;
196
+ } else {
197
+ // Existing prompt flow
198
+ editorResponse = await enquirer . prompt < { includeEditor : boolean } > ( {
199
+ type : 'confirm' ,
200
+ name : 'includeEditor' ,
201
+ message : 'Would you like to include the local editor? (Recommended for development)' ,
202
+ initial : true ,
203
+ } ) ;
204
+
205
+ configAnswers = await promptConfigQuestions ( ) ;
206
+ }
186
207
187
208
const spinner = ora ( 'Creating project...' ) . start ( ) ;
188
209
You can’t perform that action at this time.
0 commit comments