* Starts the React Native Packager Server.
(argv, config, args)
| 15 | * Starts the React Native Packager Server. |
| 16 | */ |
| 17 | function server(argv, config, args) { |
| 18 | args.projectRoots = args.projectRoots.concat(args.root); |
| 19 | |
| 20 | const startedCallback = logReporter => { |
| 21 | logReporter.update({ |
| 22 | type: 'initialize_packager_started', |
| 23 | port: args.port, |
| 24 | projectRoots: args.projectRoots, |
| 25 | }); |
| 26 | |
| 27 | process.on('uncaughtException', error => { |
| 28 | logReporter.update({ |
| 29 | type: 'initialize_packager_failed', |
| 30 | port: args.port, |
| 31 | error, |
| 32 | }); |
| 33 | |
| 34 | process.exit(11); |
| 35 | }); |
| 36 | }; |
| 37 | |
| 38 | const readyCallback = logReporter => { |
| 39 | logReporter.update({ |
| 40 | type: 'initialize_packager_done', |
| 41 | }); |
| 42 | }; |
| 43 | |
| 44 | runServer(args, config, startedCallback, readyCallback); |
| 45 | } |
| 46 | |
| 47 | module.exports = { |
| 48 | name: 'start', |
nothing calls this directly
no test coverage detected
searching dependent graphs…