@dysonic/dy-cli-cmd-build
v1.0.8
Published
Built-in build command for generating CJS, ESM, UMD, and other package outputs
Readme
@dysonic/dy-cli-cmd-build
Architecture
flowchart LR
user["User"] --> command["BuildCommand"]
command --> tasks["package / types / umd / bin tasks"]
tasks --> builders["Rollup builders"]
tasks --> resolver["project resolver"]
builders --> output["dist outputs"]@dysonic/dy-cli-cmd-build implements the dy-cli build command.
It builds project packages and supports:
- default package build
- declaration output build
- UMD output build
For the Chinese version, see README_ZH.md.
Role
This package is no longer a package.json script wrapper.
It owns the real build behavior.
That means:
dy-cli buildperforms the build directly- it does not depend on extra project-local build scripts
Main Contents
src/commands/build.tsbuild command entrysrc/taskstarget-specific build taskssrc/buildersconcrete build implementations
Command Semantics
dy-cli build
dy-cli build --types
dy-cli build --umdSupported Capabilities
- builds ESM / CJS by default
- also emits the executable output by default when the package declares
bin - builds declaration files with
--types - builds UMD bundles with
--umd - reads UMD settings from
dy.config.ts - builds all child packages by default when executed at a monorepo root
- searches upward for the nearest
dy.config.tsin monorepo child package scenarios
Design Notes
This package follows a Command -> Task -> Builder layering:
Commandparses args and configTaskorchestrates build targetsBuilderhandles concrete Rollup behavior
