Skip to content

Commit 82d565f

Browse files
committed
Added copy-assets to postinstall. Updated readme.
1 parent 185c09b commit 82d565f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

demos/angular-supabase-todolist/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@ A step-by-step guide on Supabase<>PowerSync integration is available [here](http
1313
## Quick Start
1414

1515
1. Run `pnpm install`
16-
2. Run `pnpm powersync-web copy-assets -o src/assets` to copy the worker assets into the project.
17-
3. Create a `.env` file by copying the template `cp .env.template .env`
18-
4. Populate the `.env` file with PowerSync and Supabase details
19-
5. Run `pnpm watch` to build application and check for code changes
20-
6. In a new terminal run `pnpm start` to start the server
21-
7. Go to <http://localhost:8080>
16+
2. Create a `.env` file by copying the template `cp .env.template .env`
17+
3. Populate the `.env` file with PowerSync and Supabase details
18+
4. Run `pnpm watch` to build application and check for code changes
19+
5. In a new terminal run `pnpm start` to start the server
20+
6. Go to <http://localhost:8080>
2221

2322
### Notes
2423

2524
- The Angular development server (`pnpm serve`) doesn't support service worker applications
26-
- For Angular, workers need to be configured when instantiating `PowerSyncDatabase`. To do this, copy the worker assets (`step 2`) and ensure the worker paths are specified ([example here](./src/app/powersync.service.ts)).
25+
- For Angular, workers need to be configured when instantiating `PowerSyncDatabase`. To do this, copy the worker assets (`pnpm powersync-web copy-assets -o src/assets` - done automatically as a `postinstall` step in this demo) and ensure the worker paths are specified ([example here](./src/app/powersync.service.ts)).
2726

2827
## Development Server
2928

demos/angular-supabase-todolist/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"build": "ng build",
99
"format": "prettier --write .",
1010
"test:build": "pnpm build",
11-
"watch": "ng build --watch --configuration development"
11+
"watch": "ng build --watch --configuration development",
12+
"postinstall": "pnpm powersync-web copy-assets -o src/assets"
1213
},
1314
"private": true,
1415
"dependencies": {

0 commit comments

Comments
 (0)