Skip to content

Commit

Permalink
Calling copy-assets as pre step for serving and building instead …
Browse files Browse the repository at this point in the history
…of as a post install.
  • Loading branch information
Chriztiaan committed Dec 12, 2024
1 parent f7587bf commit cfddbcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion demos/angular-supabase-todolist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A step-by-step guide on Supabase<>PowerSync integration is available [here](http
### Notes

- The Angular development server (`pnpm serve`) doesn't support service worker applications
- 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)).
- 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)).

## Development Server

Expand Down
7 changes: 5 additions & 2 deletions demos/angular-supabase-todolist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
"name": "angular-supabase-todolist",
"version": "0.0.25",
"scripts": {
"copy-assets": "pnpm powersync-web copy-assets -o src/assets",
"ng": "ng",
"preserve": "pnpm copy-assets",
"serve": "ng serve",
"start": "http-server -p 8080 -c-1 dist/",
"prebuild": "pnpm copy-assets",
"build": "ng build",
"format": "prettier --write .",
"test:build": "pnpm build",
"watch": "ng build --watch --configuration development",
"postinstall": "[ \"$GITHUB_ACTIONS\" = \"true\" ] || pnpm powersync-web copy-assets -o src/assets"
"prewatch": "pnpm copy-assets",
"watch": "ng build --watch --configuration development"
},
"private": true,
"dependencies": {
Expand Down

0 comments on commit cfddbcc

Please sign in to comment.