Come one, come all! Your help is needed in making
Earwurm
better than it has any right to be!
First of all, thank you. Second of all, issues can be found here.
- Clone repo.
- Install dependencies (must use
pnpm
). - Get coding!
Cloning the repo:
# Over HTTPS
git clone https://github.com/beefchimi/earwurm.git
# Over SSH
git clone [email protected]:beefchimi/earwurm.git
# Using the CLI
gh repo clone beefchimi/earwurm
# Once cloned, change into the directory
cd earwurm
Installing project dependencies:
# PNPM is our package manager of choice and must be used!
pnpm i
Get coding:
# Simply run the `start` command from the project root
pnpm start
For a list of all the available commands, please see the root package.json
. Overall, commands are kept simple, so there shouldn't be any surprises. Typically, the commands you are going to use are:
build
will build all packages and apps.start
will build and watch any relevantpkg
folders, and build and fire up development servers for allapp
folders.- All
localhost
addresses for running apps will be printed to your terminal when you runstart
.
- All
lint
checks the codebase foreslint
errors, but does not fix them.lint:fix
automatically fixes anyeslint
errors that can be programatically resolved.type-check
checks the codebase for any TypeScript errors, but does not fix them.test
fires up thevitest
server and runs all*.test.ts
files.clean
will delete anydist
andcoverage
folders.nuke
will runclean
along with blowing away allnode_modules
and pruning unusedpnpm
packages.
If you want to run commands from specific apps/packages, you can use pnpm --filter app-or-package-name command-name
... but honestly, you should be able to do everything you need to from the root using only the commands found in the root package.json
.
The primary package produced by this monorepo is earwurm
, located within the ~/pkg/earwurm
directory.
Once you have submitted a PR and it is ready for review:
- Run the
pnpm report
command and respond to the prompts.- Declare the “change impact” (is this a major/minor/patch change).
- Provide a
CHANGELOG
message.
- Once finished, add the generated
*.md
file and commit it / push to your branch.
Publishing is handled automatically by the @changesets
package. This package, in concert with Changesets Bot and release.yml
GitHub workflow, allows us to publish earwurm
whenever the main
branch sees a package.json > version
value change.
To aid in local development, I have provided a demo application (app/website
). This app doubles as our “marketing site”, which is also built-and-deployed through GitHub.
Simply run the start
command from the project root and you will get file watching for pkg/earwurm
as well as HMR for the website
. Any changes you make to earwurm
are automatically available to the website
.
Your terminal should report the localhost
address. Take note: since we host on GitHub Pages
, the address will end with /earwurm/
. Expect something like: http://localhost:5173/earwurm/
.
If you want to preview the production build of the website
, you can run the following from the project root:
pnpm build
pnpm preview
The website
should now be available on a locally reachable address, allowing you to test on a mobile
device.
To help surface some additional details about the state history of the Earwurm
instance, you can append the ?mode=debug
param to the end of the url. Something like: http://localhost:5173/earwurm/?mode=debug