-
Notifications
You must be signed in to change notification settings - Fork 141
Description
js-ipfs has a comprehensive example suite at https://github.com/ipfs-examples/js-ipfs-examples - it would be amazing for helia to have something similar.
The example suite is a monorepo with all examples in the examples directory. Each example is a self-contained module that showcases one feature of js-ipfs or how to integrate it with a build tool, and they all contain tests to prevent regressions.
Each example is copied into it's own repo in the ipfs-examples org by the fork & go github action to aid discoverability yet make the maintenance of these examples manageable.
Syncing changes
Changes to the monorepo are pulled into the split-out repos, any changes that have been made to the split-out repos are discarded. This is done by a sync job copied from the fork & go template.
An improvement for helia would be to switch this around and have the monorepo push changes out to the split-out repos, the reason being the sync job runs on a timer and GitHub disables the timer if no changes are observed for a month or so, which means a maintainer has to manually go through and re-enable the timer for every split-out repo periodically - see ipfs-examples/js-ipfs-examples#44
Where to start
Create a repo in the ipfs-examples org called helia-examples.
Start with just one example, perhaps bundling with esbuild (easy since aegir already builds helia with esbuild for browser tests so there shouldn't be any extra config required) - port the example, the docs and the tests.
The sync job should be run from the helia-examples repo instead of from the split-out repos.
Prequisites
After #17 is merged helia should be installable with npm i helia@next. An automated PR will also be created that sets up a gated release of v1 of helia - when that is merged dependabot should take care of upgrading all the example deps.