Examples Overview
The base repository provides a dedicated examples/ directory for single-purpose capability demos.
These examples are:
- Reference projects for integration patterns
- Verification projects for monorepo compatibility
- Not official app templates in
vup add - Not packages added through
vup use
Available Examples
| Command Name | Output Directory | Purpose | Related Docs |
|---|---|---|---|
example-mock | examples/mock | @vup/mock integration | Mock |
example-pwa | examples/pwa | @vup/pwa integration | PWA |
example-qiankun | examples/qiankun | qiankun sub-app integration | Qiankun |
example-ui | examples/ui | UI component usage and integration | UI, UI Mobile |
Suggested Usage
- Use
vup addto create your real app first. - Run
vup example -lto list available example templates. - Run
vup example <exampleName>to add one example under your projectexamples/. - Port only the parts you need into your app, avoid copying full example code.
For example:
bash
vup example example-mockCommand Reference
bash
vup example <exampleName>
vup example <exampleName> --path /custom/path
vup example <exampleName> --force
vup example -l