gzuidhof / starboard-notebook

In-browser literate notebooks
Mozilla Public License 2.0
1.24k stars 99 forks source link

New release with Pyodide 0.25? #148

Open danyx23 opened 6 months ago

danyx23 commented 6 months ago

What an amazing project! I recently found this and am tinkering with using it. I saw that @bartbroere upgraded Pyodide to 0.25 which has the nice feature of making the very popular python requests library work out of the box. What would it take to ship a new version of the starboard library to npm with this? I'd be happy to help if I can.

gzuidhof commented 6 months ago

I'm sorry, this is totally my lack of time since starting a company some years ago.

Build process

The main thing that is painful is the build process of Starboard. It consists of multiple packages (that Lerna is supposed to make easy, but it's still rather confusing). If esbuild was around when this project started I would have tried to use that where possible.

A tricky thing is that we support the Monaco editor. While it's great, it requires Webpack to build and it's a beast in terms of bundle size too. Bundle size is something I did always care about, so I took care to only load parts of the codebase on-demand.

How you can contribute

In the best case, we would be able to build and trigger releases from Github Actions entirely. If that is something you would be willing to contribute that would be great.

From a different project (publish.yml) for inspiration:

name: Publish to NPM
on:
  release:
    types: [published]
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v3
        with:
          node-version: '20.x'
          registry-url: 'https://registry.npmjs.org'
      - run: npm ci # These steps won't be the same for this repo
      - run: npm run build:dist
      - run: npm test
      - run: npm run dist
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

In the short term, I would be happy to add @bartbroere as a collaborator on GH and publisher on NPM, if you are up for that @bartbroere?

danyx23 commented 6 months ago

@gzuidhof thanks for the fast reply! That sounds like something I could help with. I'm travelling a lot at the moment so my interactions will probably be a bit on and off but I'll see what I can do to automate this.

And BTW, a huge thank you for making this open source! It's such a pain when you discover a promising project only to find out it is no longer being developed but the source is closed and there is nothing to do about it. 🙏 🙇 !