Skip to content

Commit cfddbcc

Browse files
committed
Calling copy-assets as pre step for serving and building instead of as a post install.
1 parent f7587bf commit cfddbcc

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

demos/angular-supabase-todolist/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A step-by-step guide on Supabase<>PowerSync integration is available [here](http
2222
### Notes
2323

2424
- The Angular development server (`pnpm serve`) doesn't support service worker applications
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)).
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 `pre-` steps in this demo for serving and building) and ensure the worker paths are specified ([example here](./src/app/powersync.service.ts)).
2626

2727
## Development Server
2828

demos/angular-supabase-todolist/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
"name": "angular-supabase-todolist",
33
"version": "0.0.25",
44
"scripts": {
5+
"copy-assets": "pnpm powersync-web copy-assets -o src/assets",
56
"ng": "ng",
7+
"preserve": "pnpm copy-assets",
68
"serve": "ng serve",
79
"start": "http-server -p 8080 -c-1 dist/",
10+
"prebuild": "pnpm copy-assets",
811
"build": "ng build",
912
"format": "prettier --write .",
1013
"test:build": "pnpm build",
11-
"watch": "ng build --watch --configuration development",
12-
"postinstall": "[ \"$GITHUB_ACTIONS\" = \"true\" ] || pnpm powersync-web copy-assets -o src/assets"
14+
"prewatch": "pnpm copy-assets",
15+
"watch": "ng build --watch --configuration development"
1316
},
1417
"private": true,
1518
"dependencies": {

0 commit comments

Comments
 (0)