File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
packages/react-native-builder-bob/src/targets Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1
1
import kleur from 'kleur' ;
2
+ import path from 'path' ;
2
3
import type { Input } from '../types' ;
3
4
import { spawn } from '../utils/spawn' ;
4
5
import dedent from 'dedent' ;
6
+ import del from 'del' ;
5
7
6
8
type Options = Input & {
7
9
options ?: {
8
10
run ?: string ;
9
11
cwd ?: string ;
12
+ clean ?: string ;
10
13
}
11
14
} ;
12
15
@@ -35,6 +38,15 @@ export default async function runScript({
35
38
36
39
const cwd = options ?. cwd ?? root
37
40
41
+ if ( options . clean ) {
42
+ report . info (
43
+ `Cleaning up previous script target at ${ kleur . blue ( path . relative ( root , options . clean ) ) } `
44
+ ) ;
45
+
46
+ await del ( [ path . resolve ( cwd , options . clean ) ] )
47
+ }
48
+
49
+
38
50
report . info (
39
51
`Running ${ kleur . blue ( options . run ) } `
40
52
) ;
You can’t perform that action at this time.
0 commit comments