Your contributions are always welcomed, encouraged, and appreciated! This document will outline:
- Recommended prerequisite knowledge
- Documentation and tooling used in the repository
- How to setup your development environment
- How to debug and test your changes
- How to submit a pull request
If you're looking to jump into developing for HarvestMonster, we recommend having the following knowledge beforehand:
- Basic understanding of HTML and CSS.
- Intermediate understanding of JavaScript.
You'll find comfort in the code if you have:
- An understanding of atomic design.
- Knowledge around strictly typed languages, because TypeScript is utilized for our stores.
- Experience with utility-first CSS, as we use Tailwind.
- Familiarity with developing applications with Electron.
- An understanding of Single Page Applications (SPAs), because we use Svelte.
Before you get started with development, you must:
- Have Node.js installed. (We've tested with v16.14.x and up.)
Getting started with a development environment can be done in just a few steps:
- Fork the repository
- Clone your forked repository
- Install dependencies with
npm i
- Run the development rig with
npm run watch
Command | Description |
---|---|
npm run build | Manually rebuilds the main, preload, and renderer builds. |
npm run compile | Compiles the app for your current operating system. |
npm run watch | Runs the development rig and rebuilds the renderer on change. |
If you're using VSCode as your IDE, the following extensions may help improve your experience working in this repository.
- Prettier applies our repo's code formatting rules for you.
- Svelte for VSCode helps you stay inside the lines when working with Svelte.
- Tailwind CSS IntelliSense adds auto-complete support for Tailwind classes.
When using the development environment, there are three packages to adjust:
main
sets up the application, creates the web view, and loads the web app.preload
acts as an intermediary betweenmain
andrenderer
, as it sets up prequisites and carefully exposes data, functions, and variables.renderer
is the web application where you'll likely be spending most of your time adjusting the user interface.
- When making adjustments to
main
andpreload
, you'll need to restart yournpm run watch
process as it does not monitor for changes and rebuild for these packages as it does forrenderer
.
Now that you've made and tested your changes, it's time to submit your code as a pull request. It is recommended that you make a new branch for each atomic change that you wish to request, as smaller, more focused pull requests are more likely to be approved and merged quickly.
- Push your branch to your remote fork
- Create a pull request into
main
from your fork's branch - If applicable, make sure any build steps against your branch complete without errors
Your PR will be reviewed and considered on a first come, first serve basis. Thank you for taking time to help improve our tool!