@dysonic/dy-cli-cmd-add
v1.0.8
Published
Built-in add command for creating child packages in monorepo projects
Readme
@dysonic/dy-cli-cmd-add
Architecture
flowchart LR
user["User"] --> command["AddCommand"]
command --> task["AddPackageTask"]
task --> resolver["project resolver"]
task --> template["package template"]
template --> output["new monorepo child package"]@dysonic/dy-cli-cmd-add implements the dy-cli add command.
Its job is to create child packages inside a monorepo quickly.
For the Chinese version, see README_ZH.md.
Role
This package only serves the monorepo scenario.
It is not used for single projects.
It has already absorbed the project-local script behavior, including:
- child package directory creation
- template rendering
- prompt-based metadata completion
- formatting as a finishing step
Main Contents
src/commands/add.tscommand entry foraddsrc/tasks/add-package-task.tschild package creation tasksrc/templates/packagechild package template
Command Semantics
dy-cli add button
dy-cli add --package-name card --description "Card component"Generated child packages stay minimal by default:
- they do not add extra
build,test, orpublishpackage scripts - child-package build, test, version, and publish flows are driven from the global
dy-clientry
The command resolves monorepo context from dy.config.ts project metadata instead of relying on package-manager-specific workspace files.
Design Notes
The goal of this package is to make monorepo child package creation go through dy-cli add instead of relying on extra project-local scripts or per-package command wrappers.
