File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
import path from 'path'
2
2
import http from 'http'
3
+ import os from 'os'
3
4
import fs from 'fs-extra'
4
5
import yargs , { Argv } from 'yargs'
5
6
import prompts from 'prompts'
@@ -239,8 +240,16 @@ function printInfo(options: ResolvedSlidevOptions, port?: number) {
239
240
console . log ( dim ( ' entry ' ) + dim ( path . dirname ( options . entry ) + path . sep ) + path . basename ( options . entry ) )
240
241
if ( port ) {
241
242
console . log ( )
242
- console . log ( `${ dim ( ' presenter mode ' ) } > ${ blue ( `http://localhost:${ bold ( port ) } /presenter` ) } ` )
243
243
console . log ( `${ dim ( ' slide show ' ) } > ${ cyan ( `http://localhost:${ bold ( port ) } /` ) } ` )
244
+ console . log ( `${ dim ( ' presenter mode ' ) } > ${ blue ( `http://localhost:${ bold ( port ) } /presenter` ) } ` )
245
+
246
+ Object . values ( os . networkInterfaces ( ) )
247
+ . forEach ( v => ( v || [ ] )
248
+ . filter ( details => details . family === 'IPv4' && ! details . address . includes ( '127.0.0.1' ) )
249
+ . forEach ( ( { address } ) => {
250
+ console . log ( `${ dim ( ' remote control ' ) } > ${ blue ( `http://${ address } :${ port } /presenter` ) } ` )
251
+ } ) ,
252
+ )
244
253
}
245
254
console . log ( )
246
255
console . log ( )
You can’t perform that action at this time.
0 commit comments