add-spa
Source
Usage
bash
npm exec saf-workflow kickoff add-spa <name>
To run this workflow automatically, tell the agent to:
- Navigate to the target package
- Run this command
- Follow the instructions until done
Checklist
When run, the workflow will:
- Copy template files and rename placeholders.
- Upsert ExampleSpaApp.vue from template
- Upsert i18n.ts from template
- Upsert main.ts from template
- Upsert node_modules from template
- Upsert package.json from template
- Upsert pages from template
- Upsert router.ts from template
- Upsert strings.ts from template
- Upsert test-app.ts from template
- Upsert tsconfig.json from template
- Upsert vitest.config.ts from template
- Add
@saflib/web-example-spa
as a dependency inclients/spas/package.json
, then runnpm install
from the root of the monorepo (not from theclients/spas
directory). - Create
index.html
andmain.ts
files inclients/spas/example-spa
similar to other SPAs already there. - Update
clients/spas/vite.config.ts
to add proxy and input properties for the new SPA. - Update all
Caddyfiles
in the repo; add the new SPA in a similar fashion with the subdomainexample-spa
. - Test the new SPA by running 'npm run build' from
deploy/prod
and make sure there are no errors.
Help Docs
bash
Usage: saf-workflow kickoff add-spa [options] <name>
Create a new SAF-powered frontend SPA using Vue, Vue-Router, and Tanstack Query
Arguments:
name Name of the new SPA (e.g. 'admin' for web-admin)
Options:
-h, --help display help for command