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 {
138
138
* New file added
139
139
*/
140
140
watcher . on ( 'add' , async ( filePath ) => {
141
- this . _clearScreen ( )
142
141
const metaData = this . compiler . rcFile . getMetaData ( filePath )
143
142
if ( ! metaData . metaFile ) {
144
143
return
145
144
}
146
145
146
+ this . _clearScreen ( )
147
+
147
148
this . _logger . create ( filePath )
148
149
await this . compiler . copyFiles ( [ filePath ] , config . options . outDir ! )
149
150
@@ -156,12 +157,13 @@ export class Watcher {
156
157
* File changed
157
158
*/
158
159
watcher . on ( 'change' , async ( filePath ) => {
159
- this . _clearScreen ( )
160
160
const metaData = this . compiler . rcFile . getMetaData ( filePath )
161
161
if ( ! metaData . metaFile ) {
162
162
return
163
163
}
164
164
165
+ this . _clearScreen ( )
166
+
165
167
if ( metaData . rcFile ) {
166
168
this . _logger . skip ( 'in-process changes to .adonisrc.json file are ignored' )
167
169
await this . compiler . copyAdonisRcFile ( config . options . outDir ! )
@@ -179,12 +181,13 @@ export class Watcher {
179
181
* File removed
180
182
*/
181
183
watcher . on ( 'unlink' , async ( filePath ) => {
182
- this . _clearScreen ( )
183
184
const metaData = this . compiler . rcFile . getMetaData ( filePath )
184
185
if ( ! metaData . metaFile ) {
185
186
return
186
187
}
187
188
189
+ this . _clearScreen ( )
190
+
188
191
if ( metaData . rcFile ) {
189
192
this . _logger . stop ( 'cannot continue after deletion of .adonisrc.json file' )
190
193
watcher . chokidar . close ( )
You can’t perform that action at this time.
0 commit comments