Skip to content

Contributing

Cay Henning edited this page Apr 17, 2024 · 6 revisions

How to contribute to Materia Widget Dev Kit

Requirements

  • Node v16 or higher
  • Yarn or Bun (both package managers are viable options and work for MWDK development)

Installation

  1. Checkout this repo or make your own fork (recommended).
  2. Run yarn install && yarn build && yarn linkinside the Materia Widget Development Kit.
  3. Run yarn start

Testing a Widget

  1. Find a widget to run the MWDK for. Run rm -rf node_modules.
  2. In your package.json, enter the GitHub URL for your MWDK development branch. For example, you can use: "materia-widget-development-kit": "https://github.com/cayb0rg/Materia-Widget-Dev-Kit.git#issue/webpack-5-upgrade"
  3. Run yarn install
  4. (Optional) Run yarn link materia-widget-development-kit. This will allow you to make changes to the MWDK without having to reinstall it in your widget.
  5. Run yarn start

How MWDK works

The MWDK uses the following technologies:

  • Express.js for the server and webpack-dev-middleware for compiling and viewing assets
  • Handlebars view engine for rendering .hbs template files. All template files can be found in the views folder.
  • Webpack 5 for compiling and bundling the assets

The player, creator, and scorescreen run on the same files as Materia, published in the Materia widget dependencies package. API Endpoints (calls to /api/json/*) are being mocked in express.js.

This Wiki will be updated over time. For now, good luck and have fun!

Clone this wiki locally