start.js 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. function _path() {
  7. const data = _interopRequireDefault(require("path"));
  8. _path = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. var _runServer = _interopRequireDefault(require("./runServer"));
  14. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  15. /**
  16. * Copyright (c) Facebook, Inc. and its affiliates.
  17. *
  18. * This source code is licensed under the MIT license found in the
  19. * LICENSE file in the root directory of this source tree.
  20. *
  21. */
  22. var _default = {
  23. name: 'start',
  24. func: _runServer.default,
  25. description: 'starts the webserver',
  26. options: [{
  27. name: '--port [number]',
  28. parse: val => Number(val)
  29. }, {
  30. name: '--host [string]',
  31. default: ''
  32. }, {
  33. name: '--projectRoot [path]',
  34. description: 'Path to a custom project root',
  35. parse: val => _path().default.resolve(val)
  36. }, {
  37. name: '--watchFolders [list]',
  38. description: 'Specify any additional folders to be added to the watch list',
  39. parse: val => val.split(',').map(folder => _path().default.resolve(folder))
  40. }, {
  41. name: '--assetPlugins [list]',
  42. description: 'Specify any additional asset plugins to be used by the packager by full filepath',
  43. parse: val => val.split(',')
  44. }, {
  45. name: '--sourceExts [list]',
  46. description: 'Specify any additional source extensions to be used by the packager',
  47. parse: val => val.split(',')
  48. }, {
  49. name: '--max-workers [number]',
  50. description: 'Specifies the maximum number of workers the worker-pool ' + 'will spawn for transforming files. This defaults to the number of the ' + 'cores available on your machine.',
  51. parse: workers => Number(workers)
  52. }, {
  53. name: '--transformer [string]',
  54. description: 'Specify a custom transformer to be used'
  55. }, {
  56. name: '--reset-cache, --resetCache',
  57. description: 'Removes cached files'
  58. }, {
  59. name: '--custom-log-reporter-path, --customLogReporterPath [string]',
  60. description: 'Path to a JavaScript file that exports a log reporter as a replacement for TerminalReporter'
  61. }, {
  62. name: '--verbose',
  63. description: 'Enables logging'
  64. }, {
  65. name: '--https',
  66. description: 'Enables https connections to the server'
  67. }, {
  68. name: '--key [path]',
  69. description: 'Path to custom SSL key'
  70. }, {
  71. name: '--cert [path]',
  72. description: 'Path to custom SSL cert'
  73. }, {
  74. name: '--config [string]',
  75. description: 'Path to the CLI configuration file',
  76. parse: val => _path().default.resolve(val)
  77. }, {
  78. name: '--no-interactive',
  79. description: 'Disables interactive mode'
  80. }]
  81. };
  82. exports.default = _default;
  83. //# sourceMappingURL=start.js.map