Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

165 строки
3.7 KiB

  1. 'use strict';
  2. /* eslint-disable
  3. global-require,
  4. multiline-ternary,
  5. space-before-function-paren
  6. */
  7. const ADVANCED_GROUP = 'Advanced options:';
  8. const DISPLAY_GROUP = 'Stats options:';
  9. const SSL_GROUP = 'SSL options:';
  10. const CONNECTION_GROUP = 'Connection options:';
  11. const RESPONSE_GROUP = 'Response options:';
  12. const BASIC_GROUP = 'Basic options:';
  13. const options = {
  14. bonjour: {
  15. type: 'boolean',
  16. describe: 'Broadcasts the server via ZeroConf networking on start'
  17. },
  18. lazy: {
  19. type: 'boolean',
  20. describe: 'Lazy'
  21. },
  22. inline: {
  23. type: 'boolean',
  24. default: true,
  25. describe: 'Inline mode (set to false to disable including client scripts like livereload)'
  26. },
  27. progress: {
  28. type: 'boolean',
  29. describe: 'Print compilation progress in percentage',
  30. group: BASIC_GROUP
  31. },
  32. 'hot-only': {
  33. type: 'boolean',
  34. describe: 'Do not refresh page if HMR fails',
  35. group: ADVANCED_GROUP
  36. },
  37. stdin: {
  38. type: 'boolean',
  39. describe: 'close when stdin ends'
  40. },
  41. open: {
  42. type: 'string',
  43. describe: 'Open the default browser, or optionally specify a browser name'
  44. },
  45. useLocalIp: {
  46. type: 'boolean',
  47. describe: 'Open default browser with local IP'
  48. },
  49. 'open-page': {
  50. type: 'string',
  51. describe: 'Open default browser with the specified page',
  52. requiresArg: true
  53. },
  54. color: {
  55. type: 'boolean',
  56. alias: 'colors',
  57. default: function supportsColor() {
  58. return require('supports-color');
  59. },
  60. group: DISPLAY_GROUP,
  61. describe: 'Enables/Disables colors on the console'
  62. },
  63. info: {
  64. type: 'boolean',
  65. group: DISPLAY_GROUP,
  66. default: true,
  67. describe: 'Info'
  68. },
  69. quiet: {
  70. type: 'boolean',
  71. group: DISPLAY_GROUP,
  72. describe: 'Quiet'
  73. },
  74. 'client-log-level': {
  75. type: 'string',
  76. group: DISPLAY_GROUP,
  77. default: 'info',
  78. describe: 'Log level in the browser (info, warning, error or none)'
  79. },
  80. https: {
  81. type: 'boolean',
  82. group: SSL_GROUP,
  83. describe: 'HTTPS'
  84. },
  85. key: {
  86. type: 'string',
  87. describe: 'Path to a SSL key.',
  88. group: SSL_GROUP
  89. },
  90. cert: {
  91. type: 'string',
  92. describe: 'Path to a SSL certificate.',
  93. group: SSL_GROUP
  94. },
  95. cacert: {
  96. type: 'string',
  97. describe: 'Path to a SSL CA certificate.',
  98. group: SSL_GROUP
  99. },
  100. pfx: {
  101. type: 'string',
  102. describe: 'Path to a SSL pfx file.',
  103. group: SSL_GROUP
  104. },
  105. 'pfx-passphrase': {
  106. type: 'string',
  107. describe: 'Passphrase for pfx file.',
  108. group: SSL_GROUP
  109. },
  110. 'content-base': {
  111. type: 'string',
  112. describe: 'A directory or URL to serve HTML content from.',
  113. group: RESPONSE_GROUP
  114. },
  115. 'watch-content-base': {
  116. type: 'boolean',
  117. describe: 'Enable live-reloading of the content-base.',
  118. group: RESPONSE_GROUP
  119. },
  120. 'history-api-fallback': {
  121. type: 'boolean',
  122. describe: 'Fallback to /index.html for Single Page Applications.',
  123. group: RESPONSE_GROUP
  124. },
  125. compress: {
  126. type: 'boolean',
  127. describe: 'Enable gzip compression',
  128. group: RESPONSE_GROUP
  129. },
  130. port: {
  131. describe: 'The port',
  132. group: CONNECTION_GROUP
  133. },
  134. 'disable-host-check': {
  135. type: 'boolean',
  136. describe: 'Will not check the host',
  137. group: CONNECTION_GROUP
  138. },
  139. socket: {
  140. type: 'String',
  141. describe: 'Socket to listen',
  142. group: CONNECTION_GROUP
  143. },
  144. public: {
  145. type: 'string',
  146. describe: 'The public hostname/ip address of the server',
  147. group: CONNECTION_GROUP
  148. },
  149. host: {
  150. type: 'string',
  151. default: 'localhost',
  152. describe: 'The hostname/ip address the server will bind to',
  153. group: CONNECTION_GROUP
  154. },
  155. 'allowed-hosts': {
  156. type: 'string',
  157. describe: 'A comma-delimited string of hosts that are allowed to access the dev server',
  158. group: CONNECTION_GROUP
  159. }
  160. };
  161. module.exports = options;