项目原始demo,不改动
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
Den här utvecklingskatalogen är arkiverad. Du kan se filer och klona katalogen, men inte öppna ärenden eller genomföra push- eller pull-förfrågningar.
 
 
 
 

49 rader
4.1 KiB

  1. module.exports = function(optimist) {
  2. optimist
  3. .boolean("help").alias("help", "h").alias("help", "?").describe("help")
  4. .string("config").describe("config", "Path to the config file")
  5. .string("config-name").describe("config-name", "Name of the config to use")
  6. .string("env").describe("env", "Environment passed to the config, when it is a function")
  7. .string("context").describe("context", "The root directory for resolving entry point and stats")
  8. .string("entry").describe("entry", "The entry point")
  9. .string("module-bind").describe("module-bind", "Bind an extension to a loader")
  10. .string("module-bind-post").describe("module-bind-post")
  11. .string("module-bind-pre").describe("module-bind-pre")
  12. .string("output-path").describe("output-path", "The output path for compilation assets")
  13. .string("output-filename").describe("output-filename", "The output filename of the bundle")
  14. .string("output-chunk-filename").describe("output-chunk-filename", "The output filename for additional chunks")
  15. .string("output-source-map-filename").describe("output-source-map-filename", "The output filename for the SourceMap")
  16. .string("output-public-path").describe("output-public-path", "The public path for the assets")
  17. .string("output-jsonp-function").describe("output-jsonp-function", "The name of the jsonp function used for chunk loading")
  18. .boolean("output-pathinfo").describe("output-pathinfo", "Include a comment with the request for every dependency")
  19. .string("output-library").describe("output-library", "Expose the exports of the entry point as library")
  20. .string("output-library-target").describe("output-library-target", "The type for exposing the exports of the entry point as library")
  21. .string("records-input-path").describe("records-input-path", "Path to the records file (reading)")
  22. .string("records-output-path").describe("records-output-path", "Path to the records file (writing)")
  23. .string("records-path").describe("records-path", "Path to the records file")
  24. .string("define").describe("define", "Define any free var in the bundle")
  25. .string("target").describe("target", "The targeted execution environment")
  26. .boolean("cache").describe("cache", "Enable in memory caching").default("cache", true)
  27. .boolean("watch").alias("watch", "w").describe("watch", "Watch the filesystem for changes")
  28. .boolean("watch-stdin").alias("watch-stdin", "stdin").describe("Exit the process when stdin is closed")
  29. .describe("watch-aggregate-timeout", "Timeout for gathering changes while watching")
  30. .describe("watch-poll", "The polling interval for watching (also enable polling)")
  31. .boolean("hot").describe("hot", "Enables Hot Module Replacement")
  32. .boolean("debug").describe("debug", "Switch loaders to debug mode")
  33. .string("devtool").describe("devtool", "Enable devtool for better debugging experience")
  34. .boolean("progress").describe("progress", "Print compilation progress in percentage")
  35. .string("resolve-alias").describe("resolve-alias", "Setup a module alias for resolving")
  36. .string("resolve-extensions").describe("resolve-extensions", "Setup extensions that should be used to resolve modules")
  37. .string("resolve-loader-alias").describe("resolve-loader-alias", "Setup a loader alias for resolving")
  38. .describe("optimize-max-chunks", "Try to keep the chunk count below a limit")
  39. .describe("optimize-min-chunk-size", "Try to keep the chunk size above a limit")
  40. .boolean("optimize-minimize").describe("optimize-minimize", "Minimize javascript and switches loaders to minimizing")
  41. .string("prefetch").describe("prefetch", "Prefetch this request")
  42. .string("provide").describe("provide", "Provide these modules as free vars in all modules")
  43. .string("plugin").describe("plugin", "Load this plugin")
  44. .boolean("bail").describe("bail", "Abort the compilation on first error")
  45. .boolean("profile").describe("profile", "Profile the compilation and include information in stats")
  46. .boolean("d").describe("d", "shortcut for --debug --devtool eval-check-module-source-map --output-pathinfo")
  47. .boolean("p").describe("p", "shortcut for --optimize-minimize --define process.env.NODE_ENV=\"production\"");
  48. };