Skip to content

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 NameOutput DirectoryPurposeRelated Docs
example-mockexamples/mock@vup/mock integrationMock
example-pwaexamples/pwa@vup/pwa integrationPWA
example-qiankunexamples/qiankunqiankun sub-app integrationQiankun
example-uiexamples/uiUI component usage and integrationUI, UI Mobile

Suggested Usage

  1. Use vup add to create your real app first.
  2. Run vup example -l to list available example templates.
  3. Run vup example <exampleName> to add one example under your project examples/.
  4. Port only the parts you need into your app, avoid copying full example code.

For example:

bash
vup example example-mock

Command Reference

bash
vup example <exampleName>
vup example <exampleName> --path /custom/path
vup example <exampleName> --force
vup example -l