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 app add - Not packages added through
vup package add
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 app addto create your real app first. - Run
vup example listto list available example templates. - Run
vup example add <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 add example-mockCommand Reference
bash
vup example add <exampleName>
vup example add <exampleName> --path /custom/path
vup example add <exampleName> --force
vup example list