File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 4
4
npm-debug.log *
5
5
yarn-debug.log *
6
6
yarn-error.log *
7
+ nohup.out
7
8
8
9
# Runtime data
9
10
pids
Original file line number Diff line number Diff line change @@ -77,20 +77,26 @@ exec('npm link react-easy-state', {
77
77
78
78
// 3. START EXAMPLE
79
79
console . customInfo ( `Starting ${ process . argv [ 2 ] } in the background.` ) ;
80
- exec ( "nohup bash -c 'npm run start' >/dev/null 2>&1 &" , {
81
- cwd : exampleFolder ,
82
- stdio : 'inherit' ,
83
- } ) ;
80
+ exec (
81
+ "nohup bash -c 'npm run start' 2>&1 > nohup.out & tail -f nohup.out &" ,
82
+ {
83
+ cwd : exampleFolder ,
84
+ stdio : 'inherit' ,
85
+ } ,
86
+ ) ;
84
87
85
88
const gracefullShutdown = ( ) => {
86
89
console . customInfo ( 'Killing nodes.' ) ;
87
90
exec ( 'killall node' , { stdio : 'inherit' } ) ;
91
+ exec ( 'rm nohup.out' , {
92
+ cwd : exampleFolder ,
93
+ stdio : 'inherit' ,
94
+ } ) ;
88
95
console . customInfo ( 'Unlinking react-easy-state.' ) ;
89
96
exec ( 'npm unlink --no-save react-easy-state' , {
90
97
cwd : exampleFolder ,
91
98
stdio : 'inherit' ,
92
99
} ) ;
93
- exec ( 'npm unlink' , { stdio : 'inherit' } ) ;
94
100
console . customInfo ( 'Stoping bundle builder.' ) ;
95
101
watcher . close ( ) ;
96
102
} ;
You can’t perform that action at this time.
0 commit comments