UNPKG

lerna

Version:

Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository

89 lines (87 loc) 2.63 kB
// libs/commands/create/src/command.ts var command = { command: "create <name> [loc]", describe: "Create a new lerna-managed package", builder(yargs) { yargs.positional("name", { describe: "The package name (including scope), which must be locally unique _and_ publicly available", type: "string" }).positional("loc", { describe: "A custom package location, defaulting to the first configured package location", type: "string" }).options({ access: { group: "Command Options:", defaultDescription: "public", describe: "When using a scope, set publishConfig.access value", choices: ["public", "restricted"] }, bin: { group: "Command Options:", defaultDescription: "<name>", describe: "Package has an executable. Customize with --bin <executableName>" }, description: { group: "Command Options:", describe: "Package description", type: "string" }, dependencies: { group: "Command Options:", describe: "A list of package dependencies", type: "array" }, "es-module": { group: "Command Options:", describe: "Initialize a transpiled ES Module", type: "boolean" }, homepage: { group: "Command Options:", describe: "The package homepage, defaulting to a subpath of the root pkg.homepage", type: "string" }, keywords: { group: "Command Options:", describe: "A list of package keywords", type: "array" }, license: { group: "Command Options:", defaultDescription: "ISC", describe: "The desired package license (SPDX identifier)", type: "string" }, private: { group: "Command Options:", describe: "Make the new package private, never published to any external registry", type: "boolean" }, registry: { group: "Command Options:", describe: "Configure the package's publishConfig.registry", type: "string" }, tag: { group: "Command Options:", describe: "Configure the package's publishConfig.tag", type: "string" }, y: { group: "Command Options:", describe: "Skip all prompts, accepting default values", alias: "yes", type: "boolean" } }); return yargs; }, async handler(argv) { const cmd = await import("./src-JX6MWJBQ.js"); return (cmd.default ?? cmd)(argv); } }; var command_default = command; export { command_default };