You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.1 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. module.exports = {
  2. definitions: [
  3. {
  4. name: 'port', alias: 'p', type: Number, defaultOption: true,
  5. description: 'Web server port', group: 'server'
  6. },
  7. {
  8. name: 'log-format', alias: 'f', type: String,
  9. description: "If a format is supplied an access log is written to stdout. If not, a dynamic statistics view is displayed. Use a preset ('none', 'dev','combined', 'short', 'tiny' or 'logstalgia') or supply a custom format (e.g. ':method -> :url').", group: 'server'
  10. },
  11. {
  12. name: 'directory', alias: 'd', type: String,
  13. description: 'Root directory, defaults to the current directory', group: 'server'
  14. },
  15. {
  16. name: 'compress', alias: 'c', type: Boolean,
  17. description: 'Enable gzip compression, reduces bandwidth.', group: 'server'
  18. },
  19. {
  20. name: 'forbid', alias: 'b', type: String, multiple: true, typeLabel: '[underline]{path} ...',
  21. description: 'A list of forbidden routes', group: 'server'
  22. },
  23. {
  24. name: 'no-cache', alias: 'n', type: Boolean,
  25. description: 'Disable etag-based caching - forces loading from disk each request.', group: 'server'
  26. },
  27. {
  28. name: 'rewrite', alias: 'r', type: String, multiple: true, typeLabel: '[underline]{expression} ...',
  29. description: "A list of URL rewrite rules, e.g. '/from -> /to'", group: 'server'
  30. },
  31. {
  32. name: 'spa', alias: 's', type: String, typeLabel: '[underline]{file}',
  33. description: 'Path to a Single Page App, e.g. app.html', group: 'server'
  34. },
  35. {
  36. name: 'help', alias: 'h', type: Boolean,
  37. description: 'Print these usage instructions', group: 'misc'
  38. },
  39. {
  40. name: 'config', type: Boolean,
  41. description: 'Print the config local-web-server would be launched with, then exit', group: 'misc'
  42. }
  43. ],
  44. usageData: {
  45. title: 'local-web-server',
  46. description: 'A simple web-server for productive front-end development.',
  47. footer: 'Project home: [underline]{https://github.com/75lb/local-web-server}',
  48. synopsis: [
  49. '$ ws [server options]',
  50. '$ ws --config',
  51. '$ ws --help'
  52. ],
  53. groups: {
  54. server: 'Server',
  55. misc: 'Misc'
  56. }
  57. }
  58. }