Skip to content

Commit

Permalink
chore: update web-app instructions for headless template
Browse files Browse the repository at this point in the history
  • Loading branch information
c12i committed May 14, 2024
1 parent 30bb0da commit 62d1d30
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions templates/headless/web-app.instructions.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ This is a headless skeleton for a hApp.

To build the app you can run

cd {{app_name}}
npm install
npm run build:happ

The `ui` directory is empty; you are expected to add your frontend there if you still intend to include one.
The ui directory is empty; you are expected to add your frontend there if you still intend to include one.

Note that the scaffolding cli does not generate UI components for this template.
Note that the scaffolding cli does not generate ui components for this template.

- For setting up a frontend, you can use a build tool such as vite:
- To set up your frontend, you can use a build tool such as vite:

cd {{app_name}}
npm create vite@latest ./ui

- Ensure your UI's local dev server port is set using the UI_PORT environment variable from the root package.json.
- Ensure your ui's local dev server port is set using the UI_PORT environment variable from the root package.json.
- Update the "network"{{#if holo_enabled}} and "network:holo"{{/if}} script in the root package.json to include your ui's start script.
- Add a "package" script in your package.json that builds the ui and creates a zip archive of all files in the ui directory.
- Update the "package" script in the root package.json to include a script that builds your ui and creates a zip archive of the build artifacts.
- Set the ./workdir/web-happ.yaml file's "ui.bundled" field to the zip archive path

0 comments on commit 62d1d30

Please sign in to comment.