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 11import kleur from 'kleur' ;
2+ import path from 'path' ;
23import type { Input } from '../types' ;
34import { spawn } from '../utils/spawn' ;
45import dedent from 'dedent' ;
6+ import del from 'del' ;
57
68type Options = Input & {
79 options ?: {
810 run ?: string ;
911 cwd ?: string ;
12+ clean ?: string ;
1013 }
1114} ;
1215
@@ -35,6 +38,15 @@ export default async function runScript({
3538
3639 const cwd = options ?. cwd ?? root
3740
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+
3850 report . info (
3951 `Running ${ kleur . blue ( options . run ) } `
4052 ) ;
You can’t perform that action at this time.
0 commit comments