@@ -68,13 +68,11 @@ async function buildTsxArgs(opinionated: boolean): Promise<Array<string>> {
6868 *
6969 * @param opinionated - Whether to use opinionated configuration
7070 * @param verbose - Whether to show verbose nodemon output (for debugging)
71- * @param clear - Whether to clear console on restart (default: true)
7271 * @returns The nodemon arguments array
7372 */
7473async function buildDevArgs (
7574 opinionated : boolean ,
7675 verbose : boolean = false ,
77- clear : boolean = true ,
7876) : Promise < Array < string > > {
7977 const tsxArgs = await buildTsxArgs ( opinionated ) ;
8078
@@ -85,14 +83,6 @@ async function buildDevArgs(
8583 args . push ( "--quiet" ) ;
8684 }
8785
88- // Build the exec command with optional clear
89- const clearCmd = clear
90- ? os . platform ( ) === "win32"
91- ? "cls &&"
92- : "clear &&"
93- : "" ;
94- const execCommand = `${ clearCmd } tsx ${ tsxArgs . join ( " " ) } ` . trim ( ) ;
95-
9686 // Core nodemon configuration
9787 args . push (
9888 "--signal" ,
@@ -108,7 +98,7 @@ async function buildDevArgs(
10898 "--ignore" ,
10999 "src/**/*.test.ts" ,
110100 "--exec" ,
111- execCommand ,
101+ `tsx ${ tsxArgs . join ( " " ) } ` ,
112102 ) ;
113103
114104 return args ;
@@ -119,7 +109,6 @@ async function buildDevArgs(
119109 */
120110interface DevCommandOptions {
121111 verbose ?: boolean ;
122- clear ?: boolean ;
123112}
124113
125114/**
@@ -137,19 +126,9 @@ export const devCommand: CommandModule<object, DevCommandOptions> = {
137126 default : false ,
138127 description : "Show verbose nodemon output for debugging" ,
139128 } ,
140- clear : {
141- alias : "c" ,
142- type : "boolean" ,
143- default : true ,
144- description : "Clear console on restart (default: true)" ,
145- } ,
146129 } ,
147130 handler : async ( argv ) => {
148- await runCommand ( {
149- command : "dev" ,
150- verbose : argv . verbose ,
151- clear : argv . clear ,
152- } ) ;
131+ await runCommand ( { command : "dev" , verbose : argv . verbose } ) ;
153132 } ,
154133} ;
155134
@@ -373,7 +352,6 @@ const clearScreen = () => {
373352interface RunCommandOptions {
374353 command : string ;
375354 verbose ?: boolean ;
376- clear ?: boolean ;
377355}
378356
379357/**
@@ -383,7 +361,6 @@ interface RunCommandOptions {
383361export const runCommand = async ( {
384362 command,
385363 verbose = false ,
386- clear = true ,
387364} : RunCommandOptions ) : Promise < void > => {
388365 const { opinionated, entryPoint } = await Compiler . loadConfig ( ) ;
389366 const outDir = getOutDir ( ) ;
@@ -393,7 +370,7 @@ export const runCommand = async ({
393370 case "dev" :
394371 await execCmd (
395372 "nodemon" ,
396- await buildDevArgs ( opinionated , verbose , clear ) ,
373+ await buildDevArgs ( opinionated , verbose ) ,
397374 ) ;
398375 break ;
399376 case "build" :
0 commit comments