-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: implement service worker example #3374
Conversation
It looks like the test for the new |
There's a webpack error before the test runs:
|
@achingbrain fixed it all passes now, was just a typo in test scripts where I had |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an awful lot of boilerplate code here, it's not terribly clear what the minimal set of code needed to get a shared worker going is and what is window dressing.
It also uses a lot of technology that may not be absolutely essential and as such are distractions. People look at these examples without a 100% understanding of TypeScript, Webpack, Babel, even JavaScript so anything that can be removed should be removed.
E.g. People will largely copy/paste the example and use it to start a new project. Ask yourself what tech choices have you then made for them? Maybe don't make those choices. For example if we can get away with just using a script tag and linking to node_modules/some-module/dist/index.min.js
instead of using a bundler, do that instead - it'll make the example more concise (good for the reader) and more maintainable since there will be fewer dependencies to be constantly upgrading (good for us).
Could you please restructure the example to show clearly what is boilerplate/unnecessary and what is not.
Co-authored-by: Alex Potsides <alex@achingbrain.net>
@achingbrain as per our discussion I have moved some pieces into utils and added a general overview section into readme that attempts to provide guidence in terms of how to navigate the code base. |
Co-authored-by: Alex Potsides <alex@achingbrain.net>
- Gate calls to ipfs.cat with ipfs.stat - Make streaming dir renderring and add a limit
@achingbrain I have addressed remaining notes
|
Adds example demonstrating how to use IPFS node in shared worker from service worker.