File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -138,12 +138,13 @@ export class Watcher {
138138 * New file added
139139 */
140140 watcher . on ( 'add' , async ( filePath ) => {
141- this . _clearScreen ( )
142141 const metaData = this . compiler . rcFile . getMetaData ( filePath )
143142 if ( ! metaData . metaFile ) {
144143 return
145144 }
146145
146+ this . _clearScreen ( )
147+
147148 this . _logger . create ( filePath )
148149 await this . compiler . copyFiles ( [ filePath ] , config . options . outDir ! )
149150
@@ -156,12 +157,13 @@ export class Watcher {
156157 * File changed
157158 */
158159 watcher . on ( 'change' , async ( filePath ) => {
159- this . _clearScreen ( )
160160 const metaData = this . compiler . rcFile . getMetaData ( filePath )
161161 if ( ! metaData . metaFile ) {
162162 return
163163 }
164164
165+ this . _clearScreen ( )
166+
165167 if ( metaData . rcFile ) {
166168 this . _logger . skip ( 'in-process changes to .adonisrc.json file are ignored' )
167169 await this . compiler . copyAdonisRcFile ( config . options . outDir ! )
@@ -179,12 +181,13 @@ export class Watcher {
179181 * File removed
180182 */
181183 watcher . on ( 'unlink' , async ( filePath ) => {
182- this . _clearScreen ( )
183184 const metaData = this . compiler . rcFile . getMetaData ( filePath )
184185 if ( ! metaData . metaFile ) {
185186 return
186187 }
187188
189+ this . _clearScreen ( )
190+
188191 if ( metaData . rcFile ) {
189192 this . _logger . stop ( 'cannot continue after deletion of .adonisrc.json file' )
190193 watcher . chokidar . close ( )
You can’t perform that action at this time.
0 commit comments