command.js 891 B

123456789101112131415161718192021222324252627282930313233343536
  1. "use strict";
  2. /**
  3. * @see https://github.com/yargs/yargs/blob/master/docs/advanced.md#providing-a-command-module
  4. */
  5. exports.command = "link";
  6. exports.describe = "Symlink together all packages that are dependencies of each other";
  7. exports.builder = (yargs) => {
  8. yargs.options({
  9. "force-local": {
  10. group: "Command Options:",
  11. describe: "Force local sibling links regardless of version range match",
  12. type: "boolean",
  13. },
  14. contents: {
  15. group: "Command Options:",
  16. describe: "Subdirectory to use as the source of the symlink. Must apply to ALL packages.",
  17. type: "string",
  18. defaultDescription: ".",
  19. },
  20. });
  21. return yargs.command(
  22. "convert",
  23. "Replace local sibling version ranges with relative file: specifiers",
  24. () => {},
  25. handler
  26. );
  27. };
  28. exports.handler = handler;
  29. function handler(argv) {
  30. return require(".")(argv);
  31. }